[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/41] hcd-dwc2: Rename USB_*CLASS macros for consistency
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 14/41] hcd-dwc2: Rename USB_*CLASS macros for consistency |
Date: |
Fri, 14 Aug 2020 20:00:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 8/14/20 12:25 AM, Eduardo Habkost wrote:
> Rename the DWC2_CLASS to DWC2_USB_CLASS and DWC2_GET_CLASS to
> DWC2_USB_GET_CLASS, for consistency with the DWC2_USB macro.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/usb/hcd-dwc2.h | 4 ++--
> hw/usb/hcd-dwc2.c | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/hw/usb/hcd-dwc2.h b/hw/usb/hcd-dwc2.h
> index 4ba809a07b..54111d835e 100644
> --- a/hw/usb/hcd-dwc2.h
> +++ b/hw/usb/hcd-dwc2.h
> @@ -182,9 +182,9 @@ struct DWC2Class {
> #define TYPE_DWC2_USB "dwc2-usb"
> #define DWC2_USB(obj) \
> OBJECT_CHECK(DWC2State, (obj), TYPE_DWC2_USB)
> -#define DWC2_CLASS(klass) \
> +#define DWC2_USB_CLASS(klass) \
> OBJECT_CLASS_CHECK(DWC2Class, (klass), TYPE_DWC2_USB)
> -#define DWC2_GET_CLASS(obj) \
> +#define DWC2_USB_GET_CLASS(obj) \
> OBJECT_GET_CLASS(DWC2Class, (obj), TYPE_DWC2_USB)
>
> #endif
> diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c
> index 56f91f6bee..97688d21bf 100644
> --- a/hw/usb/hcd-dwc2.c
> +++ b/hw/usb/hcd-dwc2.c
> @@ -1155,7 +1155,7 @@ static void dwc2_work_timer(void *opaque)
>
> static void dwc2_reset_enter(Object *obj, ResetType type)
> {
> - DWC2Class *c = DWC2_GET_CLASS(obj);
> + DWC2Class *c = DWC2_USB_GET_CLASS(obj);
> DWC2State *s = DWC2_USB(obj);
> int i;
>
> @@ -1239,7 +1239,7 @@ static void dwc2_reset_enter(Object *obj, ResetType
> type)
>
> static void dwc2_reset_hold(Object *obj)
> {
> - DWC2Class *c = DWC2_GET_CLASS(obj);
> + DWC2Class *c = DWC2_USB_GET_CLASS(obj);
> DWC2State *s = DWC2_USB(obj);
>
> trace_usb_dwc2_reset_hold();
> @@ -1253,7 +1253,7 @@ static void dwc2_reset_hold(Object *obj)
>
> static void dwc2_reset_exit(Object *obj)
> {
> - DWC2Class *c = DWC2_GET_CLASS(obj);
> + DWC2Class *c = DWC2_USB_GET_CLASS(obj);
> DWC2State *s = DWC2_USB(obj);
>
> trace_usb_dwc2_reset_exit();
> @@ -1382,7 +1382,7 @@ static Property dwc2_usb_properties[] = {
> static void dwc2_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - DWC2Class *c = DWC2_CLASS(klass);
> + DWC2Class *c = DWC2_USB_CLASS(klass);
> ResettableClass *rc = RESETTABLE_CLASS(klass);
>
> dc->realize = dwc2_realize;
>
- Re: [PATCH 13/41] hvf: Add missing include, (continued)
- [PATCH 08/41] opentitan: Rename memmap enum constants, Eduardo Habkost, 2020/08/13
- [PATCH 16/41] throttle-groups: Move ThrottleGroup typedef to header, Eduardo Habkost, 2020/08/13
- [PATCH 14/41] hcd-dwc2: Rename USB_*CLASS macros for consistency, Eduardo Habkost, 2020/08/13
- [PATCH 15/41] tulip: Move TulipState typedef to header, Eduardo Habkost, 2020/08/13
- [PATCH 18/41] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h, Eduardo Habkost, 2020/08/13
- [PATCH 19/41] hvf: Move HVFState typedef to hvf.h, Eduardo Habkost, 2020/08/13
- [PATCH 17/41] pci: Move PCIBusClass typedef to pci.h, Eduardo Habkost, 2020/08/13