* [Qemu-trivial] [PATCH v2] hw/timer: Move extern declaration from .c to .h file
@ 2014-07-07 19:50 ` Stefan Weil
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2014-07-07 19:50 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, 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 <sw@weilnetz.de>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Qemu-devel] [PATCH v2] hw/timer: Move extern declaration from .c to .h file
@ 2014-07-07 19:50 ` Stefan Weil
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2014-07-07 19:50 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, 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 <sw@weilnetz.de>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Qemu-trivial] [PATCH v2] hw/timer: Move extern declaration from .c to .h file
2014-07-07 19:50 ` [Qemu-devel] " Stefan Weil
@ 2014-08-02 13:32 ` Michael Tokarev
-1 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-08-02 13:32 UTC (permalink / raw)
To: Stefan Weil, qemu-devel; +Cc: qemu-trivial, Peter Maydell
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-02 13:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 19:50 [Qemu-trivial] [PATCH v2] hw/timer: Move extern declaration from .c to .h file Stefan Weil
2014-07-07 19:50 ` [Qemu-devel] " Stefan Weil
2014-08-02 13:32 ` [Qemu-trivial] " Michael Tokarev
2014-08-02 13:32 ` [Qemu-devel] " Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.