From e7ae771f6de2c7b3fa87823f87d6e10caeb91ec6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 8 Mar 2015 19:30:01 +0100 Subject: Fix remaining warnings from Sparse (void return) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sparse report: hw/display/vga.c:2000:5: warning: returning void-valued expression hw/intc/arm_gic.c:707:9: warning: returning void-valued expression hw/intc/etraxfs_pic.c:138:9: warning: returning void-valued expression hw/nvram/fw_cfg.c:475:5: warning: returning void-valued expression hw/timer/a9gtimer.c:124:5: warning: returning void-valued expression hw/tpm/tpm_tis.c:794:5: warning: returning void-valued expression hw/usb/hcd-musb.c:558:9: warning: returning void-valued expression hw/usb/hcd-musb.c:776:13: warning: returning void-valued expression hw/usb/hcd-musb.c:867:5: warning: returning void-valued expression hw/usb/hcd-musb.c:932:5: warning: returning void-valued expression include/qom/cpu.h:584:5: warning: returning void-valued expression monitor.c:4686:13: warning: returning void-valued expression monitor.c:4690:13: warning: returning void-valued expression Cc: Edgar E. Iglesias Cc: Gerd Hoffmann Cc: Andreas Färber Cc: Luiz Capitulino Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/usb/hcd-musb.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'hw/usb/hcd-musb.c') diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index 40809f610e..61cc87894e 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -554,8 +554,10 @@ static void musb_schedule_cb(USBPort *port, USBPacket *packey) timeout = ep->timeout[dir]; else if (ep->interrupt[dir]) timeout = 8; - else - return musb_cb_tick(ep); + else { + musb_cb_tick(ep); + return; + } if (!ep->intv_timer[dir]) ep->intv_timer[dir] = timer_new_ns(QEMU_CLOCK_VIRTUAL, musb_cb_tick, ep); @@ -772,9 +774,11 @@ static void musb_rx_packet_complete(USBPacket *packey, void *opaque) /* NAK timeouts are only generated in Bulk transfers and * Data-errors in Isochronous. */ - if (ep->interrupt[1]) - return musb_packet(s, ep, epnum, USB_TOKEN_IN, - packey->iov.size, musb_rx_packet_complete, 1); + if (ep->interrupt[1]) { + musb_packet(s, ep, epnum, USB_TOKEN_IN, + packey->iov.size, musb_rx_packet_complete, 1); + return; + } ep->csr[1] |= MGC_M_RXCSR_DATAERROR; if (!epnum) @@ -864,8 +868,7 @@ static void musb_tx_rdy(MUSBState *s, int epnum) * but it doesn't make sense for us to do that. */ } - return musb_packet(s, ep, epnum, pid, - total, musb_tx_packet_complete, 0); + musb_packet(s, ep, epnum, pid, total, musb_tx_packet_complete, 0); } static void musb_rx_req(MUSBState *s, int epnum) @@ -929,8 +932,7 @@ static void musb_rx_req(MUSBState *s, int epnum) } #endif - return musb_packet(s, ep, epnum, USB_TOKEN_IN, - total, musb_rx_packet_complete, 1); + musb_packet(s, ep, epnum, USB_TOKEN_IN, total, musb_rx_packet_complete, 1); } static uint8_t musb_read_fifo(MUSBEndPoint *ep) -- cgit 1.4.1