Commit d660366d authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Johan Hedberg

Bluetooth: Remove dead int returns

These functions were returning always 0, we just make then void.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarMat Martineau <mathewm@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent be4aad05
...@@ -73,7 +73,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data); ...@@ -73,7 +73,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
static void l2cap_send_disconn_req(struct l2cap_conn *conn, static void l2cap_send_disconn_req(struct l2cap_conn *conn,
struct l2cap_chan *chan, int err); struct l2cap_chan *chan, int err);
static int l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control, static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event); struct sk_buff_head *skbs, u8 event);
/* ---- L2CAP channels ---- */ /* ---- L2CAP channels ---- */
...@@ -1685,8 +1685,8 @@ static void l2cap_retrans_timeout(struct work_struct *work) ...@@ -1685,8 +1685,8 @@ static void l2cap_retrans_timeout(struct work_struct *work)
l2cap_chan_put(chan); l2cap_chan_put(chan);
} }
static int l2cap_streaming_send(struct l2cap_chan *chan, static void l2cap_streaming_send(struct l2cap_chan *chan,
struct sk_buff_head *skbs) struct sk_buff_head *skbs)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct l2cap_ctrl *control; struct l2cap_ctrl *control;
...@@ -1719,8 +1719,6 @@ static int l2cap_streaming_send(struct l2cap_chan *chan, ...@@ -1719,8 +1719,6 @@ static int l2cap_streaming_send(struct l2cap_chan *chan,
chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq); chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
chan->frames_sent++; chan->frames_sent++;
} }
return 0;
} }
static int l2cap_ertm_send(struct l2cap_chan *chan) static int l2cap_ertm_send(struct l2cap_chan *chan)
...@@ -2254,13 +2252,11 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len, ...@@ -2254,13 +2252,11 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
break; break;
if (chan->mode == L2CAP_MODE_ERTM) if (chan->mode == L2CAP_MODE_ERTM)
err = l2cap_tx(chan, NULL, &seg_queue, l2cap_tx(chan, NULL, &seg_queue, L2CAP_EV_DATA_REQUEST);
L2CAP_EV_DATA_REQUEST);
else else
err = l2cap_streaming_send(chan, &seg_queue); l2cap_streaming_send(chan, &seg_queue);
if (!err) err = len;
err = len;
/* If the skbs were not queued for sending, they'll still be in /* If the skbs were not queued for sending, they'll still be in
* seg_queue and need to be purged. * seg_queue and need to be purged.
...@@ -2383,12 +2379,10 @@ static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan) ...@@ -2383,12 +2379,10 @@ static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
chan->rx_state = L2CAP_RX_STATE_RECV; chan->rx_state = L2CAP_RX_STATE_RECV;
} }
static int l2cap_tx_state_xmit(struct l2cap_chan *chan, static void l2cap_tx_state_xmit(struct l2cap_chan *chan,
struct l2cap_ctrl *control, struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event) struct sk_buff_head *skbs, u8 event)
{ {
int err = 0;
BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs, BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
event); event);
...@@ -2455,16 +2449,12 @@ static int l2cap_tx_state_xmit(struct l2cap_chan *chan, ...@@ -2455,16 +2449,12 @@ static int l2cap_tx_state_xmit(struct l2cap_chan *chan,
default: default:
break; break;
} }
return err;
} }
static int l2cap_tx_state_wait_f(struct l2cap_chan *chan, static void l2cap_tx_state_wait_f(struct l2cap_chan *chan,
struct l2cap_ctrl *control, struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event) struct sk_buff_head *skbs, u8 event)
{ {
int err = 0;
BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs, BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
event); event);
...@@ -2537,31 +2527,25 @@ static int l2cap_tx_state_wait_f(struct l2cap_chan *chan, ...@@ -2537,31 +2527,25 @@ static int l2cap_tx_state_wait_f(struct l2cap_chan *chan,
default: default:
break; break;
} }
return err;
} }
static int l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control, static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event) struct sk_buff_head *skbs, u8 event)
{ {
int err = 0;
BT_DBG("chan %p, control %p, skbs %p, event %d, state %d", BT_DBG("chan %p, control %p, skbs %p, event %d, state %d",
chan, control, skbs, event, chan->tx_state); chan, control, skbs, event, chan->tx_state);
switch (chan->tx_state) { switch (chan->tx_state) {
case L2CAP_TX_STATE_XMIT: case L2CAP_TX_STATE_XMIT:
err = l2cap_tx_state_xmit(chan, control, skbs, event); l2cap_tx_state_xmit(chan, control, skbs, event);
break; break;
case L2CAP_TX_STATE_WAIT_F: case L2CAP_TX_STATE_WAIT_F:
err = l2cap_tx_state_wait_f(chan, control, skbs, event); l2cap_tx_state_wait_f(chan, control, skbs, event);
break; break;
default: default:
/* Ignore event */ /* Ignore event */
break; break;
} }
return err;
} }
static void l2cap_pass_to_tx(struct l2cap_chan *chan, static void l2cap_pass_to_tx(struct l2cap_chan *chan,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment