aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 18:22:35 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 18:22:35 +0000
commit7442511ca141c67a20e85dec34b206cb413479d7 (patch)
tree855be4e1da2d19bb1024e61309885838cc9cd282 /hw
parent856ae5c3324abb8fe6d905262e1cc9f4437e719f (diff)
downloadqemu-7442511ca141c67a20e85dec34b206cb413479d7.zip
qemu-7442511ca141c67a20e85dec34b206cb413479d7.tar.gz
qemu-7442511ca141c67a20e85dec34b206cb413479d7.tar.bz2
Don't try to return result from a void function (spotted by Sparse)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7017 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/bt-hci.c26
-rw-r--r--hw/bt-hid.c2
-rw-r--r--hw/fw_cfg.c4
-rw-r--r--hw/lm832x.c6
-rw-r--r--hw/wm8750.c2
5 files changed, 24 insertions, 16 deletions
diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index 7e93e26..a5902b0 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -564,9 +564,11 @@ static void bt_hci_inquiry_result(struct bt_hci_s *hci,
switch (hci->lm.inquiry_mode) {
case 0x00:
- return bt_hci_inquiry_result_standard(hci, slave);
+ bt_hci_inquiry_result_standard(hci, slave);
+ return;
case 0x01:
- return bt_hci_inquiry_result_with_rssi(hci, slave);
+ bt_hci_inquiry_result_with_rssi(hci, slave);
+ return;
default:
fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__,
hci->lm.inquiry_mode);
@@ -771,9 +773,11 @@ static void bt_hci_lmp_connection_request(struct bt_link_s *link)
struct bt_hci_s *hci = hci_from_device(link->slave);
evt_conn_request params;
- if (hci->conn_req_host)
- return bt_hci_connection_reject(hci, link->host,
- HCI_REJECTED_LIMITED_RESOURCES);
+ if (hci->conn_req_host) {
+ bt_hci_connection_reject(hci, link->host,
+ HCI_REJECTED_LIMITED_RESOURCES);
+ return;
+ }
hci->conn_req_host = link->host;
/* TODO: if masked and auto-accept, then auto-accept,
* if masked and not auto-accept, then auto-reject */
@@ -2125,7 +2129,7 @@ static void bt_hci_evt_submit(void *opaque, int len)
/* TODO: notify upper layer */
struct bt_hci_s *s = opaque;
- return s->info.evt_recv(s->info.opaque, s->evt_buf, len);
+ s->info.evt_recv(s->info.opaque, s->evt_buf, len);
}
static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr)
@@ -2141,7 +2145,7 @@ static void bt_hci_destroy(struct bt_device_s *dev)
{
struct bt_hci_s *hci = hci_from_device(dev);
- return bt_hci_done(&hci->info);
+ bt_hci_done(&hci->info);
}
struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net)
@@ -2196,9 +2200,11 @@ static void bt_hci_done(struct HCIInfo *info)
/* Be gentle and send DISCONNECT to all connected peers and those
* currently waiting for us to accept or reject a connection request.
* This frees the links. */
- if (hci->conn_req_host)
- return bt_hci_connection_reject(hci,
- hci->conn_req_host, HCI_OE_POWER_OFF);
+ if (hci->conn_req_host) {
+ bt_hci_connection_reject(hci,
+ hci->conn_req_host, HCI_OE_POWER_OFF);
+ return;
+ }
for (handle = HCI_HANDLE_OFFSET;
handle < (HCI_HANDLE_OFFSET | HCI_HANDLES_MAX); handle ++)
diff --git a/hw/bt-hid.c b/hw/bt-hid.c
index 3317ecc..af0c3d5 100644
--- a/hw/bt-hid.c
+++ b/hw/bt-hid.c
@@ -383,7 +383,7 @@ static void bt_hid_control_sdu(void *opaque, const uint8_t *data, int len)
{
struct bt_hid_device_s *hid = opaque;
- return bt_hid_control_transaction(hid, data, len);
+ bt_hid_control_transaction(hid, data, len);
}
static void bt_hid_datain(void *opaque)
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index e324e8d..e1b19d7 100644
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
@@ -108,7 +108,7 @@ static uint32_t fw_cfg_io_readb(void *opaque, uint32_t addr)
static void fw_cfg_io_writeb(void *opaque, uint32_t addr, uint32_t value)
{
- return fw_cfg_write(opaque, (uint8_t)value);
+ fw_cfg_write(opaque, (uint8_t)value);
}
static void fw_cfg_io_writew(void *opaque, uint32_t addr, uint32_t value)
@@ -124,7 +124,7 @@ static uint32_t fw_cfg_mem_readb(void *opaque, target_phys_addr_t addr)
static void fw_cfg_mem_writeb(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
- return fw_cfg_write(opaque, (uint8_t)value);
+ fw_cfg_write(opaque, (uint8_t)value);
}
static void fw_cfg_mem_writew(void *opaque, target_phys_addr_t addr,
diff --git a/hw/lm832x.c b/hw/lm832x.c
index dd94310..6479e14 100644
--- a/hw/lm832x.c
+++ b/hw/lm832x.c
@@ -519,8 +519,10 @@ void lm832x_key_event(struct i2c_slave *i2c, int key, int state)
if ((s->status & INT_ERROR) && (s->error & ERR_FIFOOVR))
return;
- if (s->kbd.len >= sizeof(s->kbd.fifo))
- return lm_kbd_error(s, ERR_FIFOOVR);
+ if (s->kbd.len >= sizeof(s->kbd.fifo)) {
+ lm_kbd_error(s, ERR_FIFOOVR);
+ return;
+ }
s->kbd.fifo[(s->kbd.start + s->kbd.len ++) & (sizeof(s->kbd.fifo) - 1)] =
key | (state << 7);
diff --git a/hw/wm8750.c b/hw/wm8750.c
index e5324ec..02d5f5e 100644
--- a/hw/wm8750.c
+++ b/hw/wm8750.c
@@ -706,7 +706,7 @@ void wm8750_dac_commit(void *opaque)
{
struct wm8750_s *s = (struct wm8750_s *) opaque;
- return wm8750_out_flush(s);
+ wm8750_out_flush(s);
}
uint32_t wm8750_adc_dat(void *opaque)