Message ID | 20200902224311.1321159-29-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
Series | qom: Rename macros for consistency | expand |
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: Gerd Hoffmann <kraxel@redhat.com> > Cc: qemu-devel@nongnu.org > --- > hw/usb/tusb6010.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c > index 2bee3ae59f..9b35c1d4b8 100644 > --- a/hw/usb/tusb6010.c > +++ b/hw/usb/tusb6010.c > @@ -30,10 +30,10 @@ > #include "hw/sysbus.h" > #include "qom/object.h" > > -#define TYPE_TUSB6010 "tusb6010" > +#define TYPE_TUSB "tusb6010" We are loosing information helpful to reviewers. Can we rename the type macro TUSB6010() instead? > typedef struct TUSBState TUSBState; > DECLARE_INSTANCE_CHECKER(TUSBState, TUSB, > - TYPE_TUSB6010) > + TYPE_TUSB) > > struct TUSBState { > SysBusDevice parent_obj; > @@ -838,7 +838,7 @@ static void tusb6010_class_init(ObjectClass *klass, void *data) > } > > static const TypeInfo tusb6010_info = { > - .name = TYPE_TUSB6010, > + .name = TYPE_TUSB, > .parent = TYPE_SYS_BUS_DEVICE, > .instance_size = sizeof(TUSBState), > .class_init = tusb6010_class_init, >
On Thu, Sep 03, 2020 at 02:56:20PM +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: Gerd Hoffmann <kraxel@redhat.com> > > Cc: qemu-devel@nongnu.org > > --- > > hw/usb/tusb6010.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c > > index 2bee3ae59f..9b35c1d4b8 100644 > > --- a/hw/usb/tusb6010.c > > +++ b/hw/usb/tusb6010.c > > @@ -30,10 +30,10 @@ > > #include "hw/sysbus.h" > > #include "qom/object.h" > > > > -#define TYPE_TUSB6010 "tusb6010" > > +#define TYPE_TUSB "tusb6010" > > We are loosing information helpful to reviewers. > Can we rename the type macro TUSB6010() instead? We can. I will do it instead.
diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 2bee3ae59f..9b35c1d4b8 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -30,10 +30,10 @@ #include "hw/sysbus.h" #include "qom/object.h" -#define TYPE_TUSB6010 "tusb6010" +#define TYPE_TUSB "tusb6010" typedef struct TUSBState TUSBState; DECLARE_INSTANCE_CHECKER(TUSBState, TUSB, - TYPE_TUSB6010) + TYPE_TUSB) struct TUSBState { SysBusDevice parent_obj; @@ -838,7 +838,7 @@ static void tusb6010_class_init(ObjectClass *klass, void *data) } static const TypeInfo tusb6010_info = { - .name = TYPE_TUSB6010, + .name = TYPE_TUSB, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(TUSBState), .class_init = tusb6010_class_init,
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: Gerd Hoffmann <kraxel@redhat.com> Cc: qemu-devel@nongnu.org --- hw/usb/tusb6010.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)