From: "Cédric Le Goater" <clg@kaod.org>
To: Greg Kurz <groug@kaod.org>, David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] ppc/pnv: Make PnvXScomInterface an incomplete type
Date: Wed, 11 Dec 2019 17:27:31 +0100 [thread overview]
Message-ID: <a3c0ab59-24e0-b230-db60-6ceb2fdadf70@kaod.org> (raw)
In-Reply-To: <157608025541.186670.1577861507610404326.stgit@bahia.lan>
On 11/12/2019 17:04, Greg Kurz wrote:
> PnvXScomInterface is an interface instance. It should never be
> dereferenced. Drop the dummy type definition for extra safety,
> which is the common practice with QOM interfaces.
>
> While here also convert the bogus OBJECT_CHECK() to INTERFACE_CHECK().
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
> ---
> v2: convert OBJECT_CHECK() to INTERFACE_CHECK()
> ---
> include/hw/ppc/pnv_xscom.h | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index 1c1d76bf9be5..306c22461587 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -22,13 +22,11 @@
>
> #include "qom/object.h"
>
> -typedef struct PnvXScomInterface {
> - Object parent;
> -} PnvXScomInterface;
> +typedef struct PnvXScomInterface PnvXScomInterface;
>
> #define TYPE_PNV_XSCOM_INTERFACE "pnv-xscom-interface"
> #define PNV_XSCOM_INTERFACE(obj) \
> - OBJECT_CHECK(PnvXScomInterface, (obj), TYPE_PNV_XSCOM_INTERFACE)
> + INTERFACE_CHECK(PnvXScomInterface, (obj), TYPE_PNV_XSCOM_INTERFACE)
> #define PNV_XSCOM_INTERFACE_CLASS(klass) \
> OBJECT_CLASS_CHECK(PnvXScomInterfaceClass, (klass), \
> TYPE_PNV_XSCOM_INTERFACE)
>
next prev parent reply other threads:[~2019-12-11 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 16:04 [PATCH v2] ppc/pnv: Make PnvXScomInterface an incomplete type Greg Kurz
2019-12-11 16:13 ` Philippe Mathieu-Daudé
2019-12-11 16:27 ` Cédric Le Goater [this message]
2019-12-12 0:37 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3c0ab59-24e0-b230-db60-6ceb2fdadf70@kaod.org \
--to=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).