qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type
Date: Wed, 11 Dec 2019 16:58:37 +0100	[thread overview]
Message-ID: <20191211165837.35375bd9@bahia.tlslab.ibm.com> (raw)
In-Reply-To: <c66981b1-0be1-6f59-8dd7-5f4744c506e1@kaod.org>

On Wed, 11 Dec 2019 16:35:41 +0100
Cédric Le Goater <clg@kaod.org> wrote:

> On 11/12/2019 15:32, 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.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> >  include/hw/ppc/pnv_xscom.h |    4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> > index 1c1d76bf9be5..b738011ab205 100644
> > --- a/include/hw/ppc/pnv_xscom.h
> > +++ b/include/hw/ppc/pnv_xscom.h
> > @@ -22,9 +22,7 @@
> >  
> >  #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) \
> 
> We should use INTERFACE_CHECK() here.
> 

Heh you're right, I missed that :) I'll send a v2 right away.

> C.
> 
>  
> 



      reply	other threads:[~2019-12-11 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 14:32 [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type Greg Kurz
2019-12-11 15:35 ` Cédric Le Goater
2019-12-11 15:58   ` Greg Kurz [this message]

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=20191211165837.35375bd9@bahia.tlslab.ibm.com \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --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).