qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type


From: Greg Kurz
Subject: Re: [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type
Date: Wed, 11 Dec 2019 16:58:37 +0100

On Wed, 11 Dec 2019 16:35:41 +0100
Cédric Le Goater <address@hidden> 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 <address@hidden>
> > ---
> >  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 via email to

[Prev in Thread] Current Thread [Next in Thread]