qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v2 06/13] hw/arm/bcm2836: Restrict BCM283XClass declaration t


From: Luc Michel
Subject: Re: [PATCH v2 06/13] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source
Date: Tue, 18 Feb 2020 09:55:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote:
> No code out of bcm2836.c uses (or requires) this declarations.
> Move it locally to the C source file.
> 
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>

Reviewed-by: Luc Michel <address@hidden>

> ---
>  include/hw/arm/bcm2836.h | 12 ------------
>  hw/arm/bcm2836.c         | 14 ++++++++++++++
>  2 files changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
> index 92a6544816..acc75bf553 100644
> --- a/include/hw/arm/bcm2836.h
> +++ b/include/hw/arm/bcm2836.h
> @@ -42,16 +42,4 @@ typedef struct BCM283XState {
>      BCM2835PeripheralState peripherals;
>  } BCM283XState;
>  
> -typedef struct BCM283XInfo BCM283XInfo;
> -
> -typedef struct BCM283XClass {
> -    DeviceClass parent_class;
> -    const BCM283XInfo *info;
> -} BCM283XClass;
> -
> -#define BCM283X_CLASS(klass) \
> -    OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
> -#define BCM283X_GET_CLASS(obj) \
> -    OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
> -
>  #endif /* BCM2836_H */
> diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
> index 38e2941bab..24109fef1d 100644
> --- a/hw/arm/bcm2836.c
> +++ b/hw/arm/bcm2836.c
> @@ -16,6 +16,15 @@
>  #include "hw/arm/raspi_platform.h"
>  #include "hw/sysbus.h"
>  
> +typedef struct BCM283XInfo BCM283XInfo;
> +
> +typedef struct BCM283XClass {
> +    /*< private >*/
> +    DeviceClass parent_class;
> +    /*< public >*/
> +    const BCM283XInfo *info;
> +} BCM283XClass;
> +
>  struct BCM283XInfo {
>      const char *name;
>      const char *cpu_type;
> @@ -24,6 +33,11 @@ struct BCM283XInfo {
>      int clusterid;
>  };
>  
> +#define BCM283X_CLASS(klass) \
> +    OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
> +#define BCM283X_GET_CLASS(obj) \
> +    OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
> +
>  static const BCM283XInfo bcm283x_socs[] = {
>      {
>          .name = TYPE_BCM2836,
> 



reply via email to

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