hw/timer: Move extern declaration from .c to .h file
PATCH 1/1 hw/timer: Move extern declaration from .c to .h file
This fixes a warning from smatch (static code analyser).
Signed-off-by Stefan Weil <[email protected]>
--- hw/timer/tusb6010.c | 3 --- include/hw/usb.h | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)
hw/timer/tusb6010.c +0 -3
@@ -282,9 +282,6 @@ static void tusb_gpio_intr_update(TUSBState *s)/* TODO: How is this signalled? */ } -extern CPUReadMemoryFunc *const musb_read[]; -extern CPUWriteMemoryFunc *const musb_write[]; -static uint32_t tusb_async_readb (void *opaque,hwaddr addr) {TUSBState *s = (TUSBState *) opaque;
include/hw/usb.h +4 -0
@@ -467,6 +467,10 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream);void usb_generic_async_ctrl_complete (USBDevice *s,USBPacket *p);int set_usb_string (uint8_t *buf,const char *str); +/* hcd-musb.c */ +extern CPUReadMemoryFunc *const musb_read[]; +extern CPUWriteMemoryFunc *const musb_write[]; +/* usb-linux.c */ USBDevice *usb_host_device_open (USBBus *bus,const char *devname);void usb_host_info (Monitor *mon,const QDict *qdict);
Signature · 1 line
1.7.10.4
Quoted 27 lines · Stefan Weil
This fixes a warning from smatch (static code analyser).
Signed-off-by Stefan Weil <[email protected]>--- hw/timer/tusb6010.c | 3 --- include/hw/usb.h | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)hw/timer/tusb6010.c +0
-3@@ -282,9 +282,6 @@ static void tusb_gpio_intr_update(TUSBState *s)/* TODO: How is this signalled? */ } -extern CPUReadMemoryFunc *const musb_read[]; -extern CPUWriteMemoryFunc *const musb_write[]; -static uint32_t tusb_async_readb (void *opaque,hwaddr addr) {TUSBState *s = (TUSBState *) opaque;include/hw/usb.h +0
-0
include/hw/usb.h void usb_wakeup(USBEndpoint *ep, unsigned int stream); · line 476
Quoted 10 lines
include/hw/usb.h +4
-0@@ -467,6 +467,10 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream);void usb_generic_async_ctrl_complete (USBDevice *s,USBPacket *p);int set_usb_string (uint8_t *buf,const char *str); +/* hcd-musb.c */ +extern CPUReadMemoryFunc *const musb_read[]; +extern CPUWriteMemoryFunc *const musb_write[]; +/* usb-linux.c */ USBDevice *usb_host_device_open (USBBus *bus,const char *devname);void usb_host_info (Monitor *mon,const QDict *qdict);
This should go in the existing section for functions and defines from this source file (which is mis-commented as "/* usb-musb.c */" following a file renaming, I see).
(It's also a pretty foul API but I think that largely follows from MUSB never having been qdevified or QOMified.)
thanks
-- PMM