From nobody Wed Nov 5 14:57:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497454412746316.5172235134776; Wed, 14 Jun 2017 08:33:32 -0700 (PDT) Received: from localhost ([::1]:49625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLAIR-0000F4-05 for importer@patchew.org; Wed, 14 Jun 2017 11:33:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLAGU-0007L7-Lr for qemu-devel@nongnu.org; Wed, 14 Jun 2017 11:31:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLAGP-0003tx-Jk for qemu-devel@nongnu.org; Wed, 14 Jun 2017 11:31:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38715) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLAGG-0003mN-5u; Wed, 14 Jun 2017 11:31:12 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 376274E4C4; Wed, 14 Jun 2017 15:31:11 +0000 (UTC) Received: from localhost (unknown [10.40.205.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DF4479C50; Wed, 14 Jun 2017 15:31:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 376274E4C4 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mreitz@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 376274E4C4 From: Max Reitz To: qemu-block@nongnu.org Date: Wed, 14 Jun 2017 17:30:59 +0200 Message-Id: <20170614153102.9077-2-mreitz@redhat.com> In-Reply-To: <20170614153102.9077-1-mreitz@redhat.com> References: <20170614153102.9077-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 14 Jun 2017 15:31:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/4] qapi/qnull: Add own header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Markus Armbruster , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- include/qapi/qmp/qnull.h | 26 ++++++++++++++++++++++++++ include/qapi/qmp/qobject.h | 8 -------- include/qapi/qmp/types.h | 1 + qobject/qnull.c | 1 + target/i386/cpu.c | 6 +----- tests/check-qnull.c | 2 +- 6 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 include/qapi/qmp/qnull.h diff --git a/include/qapi/qmp/qnull.h b/include/qapi/qmp/qnull.h new file mode 100644 index 0000000..69555ac --- /dev/null +++ b/include/qapi/qmp/qnull.h @@ -0,0 +1,26 @@ +/* + * QNull Module + * + * Copyright (C) 2009, 2017 Red Hat Inc. + * + * Authors: + * Luiz Capitulino + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or l= ater. + * See the COPYING.LIB file in the top-level directory. + */ + +#ifndef QNULL_H +#define QNULL_H + +#include "qapi/qmp/qobject.h" + +extern QObject qnull_; + +static inline QObject *qnull(void) +{ + qobject_incref(&qnull_); + return &qnull_; +} + +#endif /* QNULL_H */ diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index b8ddbca..ef1d1a9 100644 --- a/include/qapi/qmp/qobject.h +++ b/include/qapi/qmp/qobject.h @@ -93,12 +93,4 @@ static inline QType qobject_type(const QObject *obj) return obj->type; } =20 -extern QObject qnull_; - -static inline QObject *qnull(void) -{ - qobject_incref(&qnull_); - return &qnull_; -} - #endif /* QOBJECT_H */ diff --git a/include/qapi/qmp/types.h b/include/qapi/qmp/types.h index 27cfbd8..4c87182 100644 --- a/include/qapi/qmp/types.h +++ b/include/qapi/qmp/types.h @@ -20,5 +20,6 @@ #include "qapi/qmp/qstring.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" +#include "qapi/qmp/qnull.h" =20 #endif /* QAPI_QMP_TYPES_H */ diff --git a/qobject/qnull.c b/qobject/qnull.c index c124d05..b3cc85e 100644 --- a/qobject/qnull.c +++ b/qobject/qnull.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qobject.h" +#include "qapi/qmp/qnull.h" =20 QObject qnull_ =3D { .type =3D QTYPE_QNULL, diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b2b1d20..f118a54 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -29,11 +29,7 @@ #include "qemu/option.h" #include "qemu/config-file.h" #include "qapi/qmp/qerror.h" -#include "qapi/qmp/qstring.h" -#include "qapi/qmp/qdict.h" -#include "qapi/qmp/qbool.h" -#include "qapi/qmp/qint.h" -#include "qapi/qmp/qfloat.h" +#include "qapi/qmp/types.h" =20 #include "qapi-types.h" #include "qapi-visit.h" diff --git a/tests/check-qnull.c b/tests/check-qnull.c index 8dd1c96..4a67b9a 100644 --- a/tests/check-qnull.c +++ b/tests/check-qnull.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" =20 -#include "qapi/qmp/qobject.h" +#include "qapi/qmp/qnull.h" #include "qemu-common.h" #include "qapi/qobject-input-visitor.h" #include "qapi/qobject-output-visitor.h" --=20 2.9.4