[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH] ppc/pnv: Make PnvXScomInterface an incomplete type |
Date: |
Wed, 11 Dec 2019 16:35:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
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.
C.