Message ID | 20200704144943.18292-15-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/usb: Give it love, reduce 'hw/usb.h' inclusion out of hw/usb/ | expand |
On Sat, Jul 4, 2020 at 7:58 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > This file is not a header, but contains source code which is > included and compiled once. We use the '.inc.c' suffix in few > other cases in the repository. Follow the same convention with > this file. > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > hw/usb/quirks.c | 2 +- > hw/usb/{quirks.h => quirks.inc.c} | 5 ----- > 2 files changed, 1 insertion(+), 6 deletions(-) > rename hw/usb/{quirks.h => quirks.inc.c} (99%) > > diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c > index 23ea7a23ea..655b36f2d5 100644 > --- a/hw/usb/quirks.c > +++ b/hw/usb/quirks.c > @@ -13,7 +13,7 @@ > */ > > #include "qemu/osdep.h" > -#include "quirks.h" > +#include "quirks.inc.c" > #include "hw/usb.h" > > static bool usb_id_match(const struct usb_device_id *ids, > diff --git a/hw/usb/quirks.h b/hw/usb/quirks.inc.c > similarity index 99% > rename from hw/usb/quirks.h > rename to hw/usb/quirks.inc.c > index 50ef2f9c2e..004b228aba 100644 > --- a/hw/usb/quirks.h > +++ b/hw/usb/quirks.inc.c > @@ -12,9 +12,6 @@ > * (at your option) any later version. > */ > > -#ifndef HW_USB_QUIRKS_H > -#define HW_USB_QUIRKS_H > - > /* 1 on 1 copy of linux/drivers/usb/serial/ftdi_sio_ids.h */ > #include "quirks-ftdi-ids.h" > /* 1 on 1 copy of linux/drivers/usb/serial/pl2303.h */ > @@ -915,5 +912,3 @@ static const struct usb_device_id usbredir_ftdi_serial_ids[] = { > > #undef USB_DEVICE > #undef USB_DEVICE_AND_INTERFACE_INFO > - > -#endif > -- > 2.21.3 > >
diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c index 23ea7a23ea..655b36f2d5 100644 --- a/hw/usb/quirks.c +++ b/hw/usb/quirks.c @@ -13,7 +13,7 @@ */ #include "qemu/osdep.h" -#include "quirks.h" +#include "quirks.inc.c" #include "hw/usb.h" static bool usb_id_match(const struct usb_device_id *ids, diff --git a/hw/usb/quirks.h b/hw/usb/quirks.inc.c similarity index 99% rename from hw/usb/quirks.h rename to hw/usb/quirks.inc.c index 50ef2f9c2e..004b228aba 100644 --- a/hw/usb/quirks.h +++ b/hw/usb/quirks.inc.c @@ -12,9 +12,6 @@ * (at your option) any later version. */ -#ifndef HW_USB_QUIRKS_H -#define HW_USB_QUIRKS_H - /* 1 on 1 copy of linux/drivers/usb/serial/ftdi_sio_ids.h */ #include "quirks-ftdi-ids.h" /* 1 on 1 copy of linux/drivers/usb/serial/pl2303.h */ @@ -915,5 +912,3 @@ static const struct usb_device_id usbredir_ftdi_serial_ids[] = { #undef USB_DEVICE #undef USB_DEVICE_AND_INTERFACE_INFO - -#endif
This file is not a header, but contains source code which is included and compiled once. We use the '.inc.c' suffix in few other cases in the repository. Follow the same convention with this file. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/usb/quirks.c | 2 +- hw/usb/{quirks.h => quirks.inc.c} | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) rename hw/usb/{quirks.h => quirks.inc.c} (99%)