qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 01/41] pl1110: Rename PL1110 enum


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 01/41] pl1110: Rename PL1110 enum
Date: Wed, 19 Aug 2020 04:45:50 +0200

Le mar. 18 août 2020 23:30, Eduardo Habkost <ehabkost@redhat.com> a écrit :
CCing maintainer (pmaydell).

On Fri, Aug 14, 2020 at 07:45:40PM +0200, Philippe Mathieu-Daudé wrote:
> On 8/14/20 12:25 AM, Eduardo Habkost wrote:
> > The PL1110 enum value name will conflict with the PL1110 type
> > cast checker, when we replace the existing macro with an inline
> > function.  Rename it to PL1110_STOCK.
>
> typo s/PL1110/PL110/ in subject and description.

Thanks for spotting that!  Will be fixed in v2.

>
> >
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  hw/display/pl110.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/hw/display/pl110.c b/hw/display/pl110.c
> > index c2991a28d2..4664fde3f2 100644
> > --- a/hw/display/pl110.c
> > +++ b/hw/display/pl110.c
> > @@ -42,7 +42,7 @@ enum pl110_bppmode
> >  /* The Versatile/PB uses a slightly modified PL110 controller.  */
> >  enum pl110_version
> >  {
> > -    PL110,
> > +    PL110_STOCK,
> >      PL110_VERSATILE,
> >      PL111
>
> For completeness I'd also rename PL111.
>
> What about:
>
>  enum pl110_version
>  {
>     PL110_VERSION,
>     PL110_VERSATILE_VERSION,
>     PL111_VERSION
>  }
>
> ?

That would work too, although I'm more used to enum values to
have a common prefix instead of a common suffix.

Any objections to:

  enum pl110_version
  {
      VERSION_PL110,
      VERSION_PL110_VERSATILE,
      VERSION_PL111
  }

?

Sounds good. 


--
Eduardo


reply via email to

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