qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL] usb: build fixes.
@ 2011-05-09 12:11 Gerd Hoffmann
  2011-05-09 12:11 ` [Qemu-devel] [PATCH 1/2] usb-musb: uninline functions Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2011-05-09 12:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Two build issues slipped through with the last usb patch queue pull.
Looks like I should do test builds with a more recent gcc ...

Here are the fixes.

pleae pull,
  Gerd

The following changes since commit 85097db6956bc86e2377b63a8309cb8b24d54139:

  irq: Privatize CPU_INTERRUPT_NMI. (2011-05-08 16:55:24 +0000)

are available in the git repository at:
  git://git.kraxel.org/qemu usb.8.pull

Gerd Hoffmann (1):
      usb-musb: uninline functions

Stefan Weil (1):
      usb-linux: Add missing break statement

 hw/usb-musb.c |    8 ++++----
 usb-linux.c   |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 1/2] usb-musb: uninline functions
  2011-05-09 12:11 [Qemu-devel] [PULL] usb: build fixes Gerd Hoffmann
@ 2011-05-09 12:11 ` Gerd Hoffmann
  2011-05-09 12:11 ` [Qemu-devel] [PATCH 2/2] usb-linux: Add missing break statement Gerd Hoffmann
  2011-05-09 12:50 ` [Qemu-devel] [PULL] usb: build fixes Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2011-05-09 12:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Prototype without "inline" keyword breaks the build with some gcc
versions.  Noticed by Alexander Graf.

Fix this by removing the inline keywork everywhere.  Some functions
can't be inlined anyway as the are referenced using function pointers.
Beside that gcc does a pretty good job on auto-inlining these days.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb-musb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index b30caeb..38986d3 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -497,14 +497,14 @@ static void musb_detach(USBPort *port)
     musb_session_update(s, 1, s->session);
 }
 
-static inline void musb_cb_tick0(void *opaque)
+static void musb_cb_tick0(void *opaque)
 {
     MUSBEndPoint *ep = (MUSBEndPoint *) opaque;
 
     ep->delayed_cb[0](&ep->packey[0].p, opaque);
 }
 
-static inline void musb_cb_tick1(void *opaque)
+static void musb_cb_tick1(void *opaque)
 {
     MUSBEndPoint *ep = (MUSBEndPoint *) opaque;
 
@@ -513,7 +513,7 @@ static inline void musb_cb_tick1(void *opaque)
 
 #define musb_cb_tick	(dir ? musb_cb_tick1 : musb_cb_tick0)
 
-static inline void musb_schedule_cb(USBDevice *dev, USBPacket *packey)
+static void musb_schedule_cb(USBDevice *dev, USBPacket *packey)
 {
     MUSBPacket *p = container_of(packey, MUSBPacket, p);
     MUSBEndPoint *ep = p->ep;
@@ -572,7 +572,7 @@ static int musb_timeout(int ttype, int speed, int val)
     hw_error("bad interval\n");
 }
 
-static inline void musb_packet(MUSBState *s, MUSBEndPoint *ep,
+static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
                 int epnum, int pid, int len, USBCallback cb, int dir)
 {
     int ret;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 2/2] usb-linux: Add missing break statement
  2011-05-09 12:11 [Qemu-devel] [PULL] usb: build fixes Gerd Hoffmann
  2011-05-09 12:11 ` [Qemu-devel] [PATCH 1/2] usb-musb: uninline functions Gerd Hoffmann
@ 2011-05-09 12:11 ` Gerd Hoffmann
  2011-05-09 12:50 ` [Qemu-devel] [PULL] usb: build fixes Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2011-05-09 12:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Hans de Goede

From: Stefan Weil <weil@mail.berlios.de>

cppcheck report:
usb-linux.c:661: warning: Redundant assignment of "len" in switch

Please check whether adding a break statement
is the correct solution for this warning.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 usb-linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index 36a01ea..0ef1d26 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -659,6 +659,7 @@ static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in)
                         switch(errno) {
                         case ETIMEDOUT:
                             len = USB_RET_NAK;
+                            break;
                         case EPIPE:
                         default:
                             len = USB_RET_STALL;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL] usb: build fixes.
  2011-05-09 12:11 [Qemu-devel] [PULL] usb: build fixes Gerd Hoffmann
  2011-05-09 12:11 ` [Qemu-devel] [PATCH 1/2] usb-musb: uninline functions Gerd Hoffmann
  2011-05-09 12:11 ` [Qemu-devel] [PATCH 2/2] usb-linux: Add missing break statement Gerd Hoffmann
@ 2011-05-09 12:50 ` Peter Maydell
  2011-05-09 14:25   ` Gerd Hoffmann
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2011-05-09 12:50 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On 9 May 2011 14:11, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Here are the fixes.
>
> pleae pull,

> Stefan Weil (1):
>      usb-linux: Add missing break statement

The commit comment for this change looks like it still
includes the remark:

# Please check whether adding a break statement is the correct
# solution for this warning.

...I think that should be removed since we have actually
done the check during review, right?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL] usb: build fixes.
  2011-05-09 12:50 ` [Qemu-devel] [PULL] usb: build fixes Peter Maydell
@ 2011-05-09 14:25   ` Gerd Hoffmann
  2011-05-09 17:41     ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2011-05-09 14:25 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

On 05/09/11 14:50, Peter Maydell wrote:
> On 9 May 2011 14:11, Gerd Hoffmann<kraxel@redhat.com>  wrote:
>> Here are the fixes.
>>
>> pleae pull,
>
>> Stefan Weil (1):
>>       usb-linux: Add missing break statement
>
> The commit comment for this change looks like it still
> includes the remark:
>
> # Please check whether adding a break statement is the correct
> # solution for this warning.

Zapped, pushed usb.9.pull branch with the rewritten comment.

cheers,
   Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL] usb: build fixes.
  2011-05-09 14:25   ` Gerd Hoffmann
@ 2011-05-09 17:41     ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2011-05-09 17:41 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Peter Maydell, qemu-devel

On 05/09/2011 09:25 AM, Gerd Hoffmann wrote:
> On 05/09/11 14:50, Peter Maydell wrote:
>> On 9 May 2011 14:11, Gerd Hoffmann<kraxel@redhat.com> wrote:
>>> Here are the fixes.
>>>
>>> pleae pull,
>>
>>> Stefan Weil (1):
>>> usb-linux: Add missing break statement
>>
>> The commit comment for this change looks like it still
>> includes the remark:
>>
>> # Please check whether adding a break statement is the correct
>> # solution for this warning.
>
> Zapped, pushed usb.9.pull branch with the rewritten comment.\

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> cheers,
> Gerd
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-09 17:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 12:11 [Qemu-devel] [PULL] usb: build fixes Gerd Hoffmann
2011-05-09 12:11 ` [Qemu-devel] [PATCH 1/2] usb-musb: uninline functions Gerd Hoffmann
2011-05-09 12:11 ` [Qemu-devel] [PATCH 2/2] usb-linux: Add missing break statement Gerd Hoffmann
2011-05-09 12:50 ` [Qemu-devel] [PULL] usb: build fixes Peter Maydell
2011-05-09 14:25   ` Gerd Hoffmann
2011-05-09 17:41     ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).