Received: from eggs.gnu.org ([2001:4830:134:3::10]:38181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4EvV-0002ll-4i for qemu-devel@nongnu.org; Mon, 07 Jul 2014 15:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4EvT-00022I-TL for qemu-devel@nongnu.org; Mon, 07 Jul 2014 15:50:13 -0400 From: Stefan Weil Date: Mon, 7 Jul 2014 21:50:07 +0200 Message-Id: <1404762607-4134-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH v2] hw/timer: Move extern declaration from .c to .h file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Stefan Weil This fixes a warning from smatch (static code analyser). Fix also the comment with the renamed source file name. Signed-off-by: Stefan Weil --- v2: Moved extern declaration to better location, fixed comment. hw/timer/tusb6010.c | 3 --- include/hw/usb.h | 7 ++++++- 2 files changed, 6 insertions(+), 4 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..223a5ae 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -475,7 +475,8 @@ void usb_host_info(Monitor *mon, const QDict *qdict); #define VM_USB_HUB_SIZE 8 -/* usb-musb.c */ +/* hw/usb/hdc-musb.c */ + enum musb_irq_source_e { musb_irq_suspend = 0, musb_irq_resume, @@ -494,6 +495,10 @@ enum musb_irq_source_e { }; typedef struct MUSBState MUSBState; + +extern CPUReadMemoryFunc * const musb_read[]; +extern CPUWriteMemoryFunc * const musb_write[]; + MUSBState *musb_init(DeviceState *parent_device, int gpio_base); void musb_reset(MUSBState *s); uint32_t musb_core_intr_get(MUSBState *s); -- 1.7.10.4