[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface |
Date: |
Wed, 2 Oct 2019 07:51:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 02/10/2019 04:51, David Gibson wrote:
> Interface instances should never be directly dereferenced. So, the common
> practice is to make them incomplete types to make sure no-one does that.
> XICSFrabric, however, had a dummy type which is less safe.
>
> We were also using OBJECT_CHECK() where we should have been using
> INTERFACE_CHECK().
>
> Signed-off-by: David Gibson <address@hidden>
> Reviewed-by: Greg Kurz <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
> ---
> include/hw/ppc/xics.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
> index 64a2c8862a..faa33ae943 100644
> --- a/include/hw/ppc/xics.h
> +++ b/include/hw/ppc/xics.h
> @@ -147,13 +147,9 @@ struct ICSIRQState {
> uint8_t flags;
> };
>
> -struct XICSFabric {
> - Object parent;
> -};
> -
> #define TYPE_XICS_FABRIC "xics-fabric"
> #define XICS_FABRIC(obj) \
> - OBJECT_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
> + INTERFACE_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
> #define XICS_FABRIC_CLASS(klass) \
> OBJECT_CLASS_CHECK(XICSFabricClass, (klass), TYPE_XICS_FABRIC)
> #define XICS_FABRIC_GET_CLASS(obj) \
>
- [PATCH v3 00/34] spapr: IRQ subsystem cleanup, David Gibson, 2019/10/01
- [PATCH v3 03/34] xics: Rename misleading ics_simple_*() functions, David Gibson, 2019/10/01
- [PATCH v3 07/34] spapr: Fold spapr_phb_lsi_qirq() into its single caller, David Gibson, 2019/10/01
- [PATCH v3 04/34] xics: Eliminate reset hook, David Gibson, 2019/10/01
- [PATCH v3 02/34] xics: Eliminate 'reject', 'resend' and 'eoi' class hooks, David Gibson, 2019/10/01
- [PATCH v3 11/34] spapr: Fix indexing of XICS irqs, David Gibson, 2019/10/01
- [PATCH v3 15/34] spapr: Handle freeing of multiple irqs in frontend only, David Gibson, 2019/10/01