[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/41] pl1110: Rename PL1110 enum
From: |
Eduardo Habkost |
Subject: |
Re: [PATCH 01/41] pl1110: Rename PL1110 enum |
Date: |
Tue, 18 Aug 2020 17:30:33 -0400 |
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
}
?
--
Eduardo
- [PATCH 00/41] qom: Automated conversion of type checking boilerplate, Eduardo Habkost, 2020/08/13
- [PATCH 03/41] megasas: Rename QOM class cast macros, Eduardo Habkost, 2020/08/13
- [PATCH 04/41] vmw_pvscsi: Rename QOM class cast macros, Eduardo Habkost, 2020/08/13
- [PATCH 05/41] aspeed_timer: Fix ASPEED_TIMER macro definition, Eduardo Habkost, 2020/08/13
- [PATCH 02/41] e1000: Rename QOM class cast macros, Eduardo Habkost, 2020/08/13