qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 14/63] i8254: Rename TYPE_I8254 to TYPE_PIT


From: Daniel P . Berrangé
Subject: Re: [PATCH 14/63] i8254: Rename TYPE_I8254 to TYPE_PIT
Date: Thu, 3 Sep 2020 17:44:29 +0100
User-agent: Mutt/1.14.6 (2020-07-11)

On Thu, Sep 03, 2020 at 12:18:09PM -0400, Eduardo Habkost wrote:
> On Thu, Sep 03, 2020 at 02:47:03PM +0200, Philippe Mathieu-Daudé wrote:
> > On 9/3/20 12:42 AM, Eduardo Habkost wrote:
> > > This will make the type name constant consistent with the name of
> > > the type checking macro.
> > > 
> > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > > ---
> > > Cc: "Michael S. Tsirkin" <mst@redhat.com>
> > > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > > Cc: qemu-devel@nongnu.org
> > > ---
> > >  include/hw/timer/i8254.h | 4 ++--
> > >  hw/timer/i8254.c         | 4 ++--
> > >  2 files changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h
> > > index 1a522a2457..ddd925074f 100644
> > > --- a/include/hw/timer/i8254.h
> > > +++ b/include/hw/timer/i8254.h
> > > @@ -45,7 +45,7 @@ typedef struct PITCommonClass PITCommonClass;
> > >  DECLARE_OBJ_CHECKERS(PITCommonState, PITCommonClass,
> > >                       PIT_COMMON, TYPE_PIT_COMMON)
> > >  
> > > -#define TYPE_I8254 "isa-pit"
> > > +#define TYPE_PIT "isa-pit"
> > 
> > I disagree with this patch, as we have various PIT and only one I8254.
> 
> I was unsure about this, and I agree with your point.  I will
> suggest renaming the PIT macro to I8254 instead.

IMHO the macro name should be directly related to the object name
string with non-alnum characters replaced by underscore.

ie since the object type is "isa-pit", then the macro should be
TYPE_ISA_PIT

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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