On 7 July 2014 20:22, Stefan Weil <s...@weilnetz.de> wrote: > This fixes a warning from smatch (static code analyser). > > Signed-off-by: Stefan Weil <s...@weilnetz.de> > --- > hw/timer/tusb6010.c | 3 --- > include/hw/usb.h | 4 ++++ > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c > index a281567..4e8f053 100644 > --- a/hw/timer/tusb6010.c > +++ b/hw/timer/tusb6010.c > @@ -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; > diff --git a/include/hw/usb.h b/include/hw/usb.h > index 8bcab48..e68e57e 100644 > --- a/include/hw/usb.h > +++ b/include/hw/usb.h > @@ -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