Skip to content

Commit 18b8529

Browse files
PavelVPVkartben
authored andcommitted
bluetooth: host: att: Remove chan_req_send
The extra `bt_att_chan_req_send` does nothing but increases readability complexity. All checks are already performed by the caller. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
1 parent bda0459 commit 18b8529

File tree

1 file changed

+2
-15
lines changed
  • subsys/bluetooth/host

1 file changed

+2
-15
lines changed

subsys/bluetooth/host/att.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ static int process_queue(struct bt_att_chan *chan, struct k_fifo *queue)
549549
}
550550

551551
/* Send requests without taking tx_sem */
552-
static int chan_req_send(struct bt_att_chan *chan, struct bt_att_req *req)
552+
static int bt_att_chan_req_send(struct bt_att_chan *chan, struct bt_att_req *req)
553553
{
554554
struct net_buf *buf;
555555
int err;
@@ -606,7 +606,7 @@ static void bt_att_sent(struct bt_l2cap_chan *ch)
606606
if (!chan->req && !sys_slist_is_empty(&att->reqs)) {
607607
sys_snode_t *node = sys_slist_get(&att->reqs);
608608

609-
if (chan_req_send(chan, ATT_REQ(node)) >= 0) {
609+
if (bt_att_chan_req_send(chan, ATT_REQ(node)) >= 0) {
610610
return;
611611
}
612612

@@ -903,19 +903,6 @@ static uint8_t att_mtu_req(struct bt_att_chan *chan, struct net_buf *buf)
903903
return 0;
904904
}
905905

906-
static int bt_att_chan_req_send(struct bt_att_chan *chan,
907-
struct bt_att_req *req)
908-
{
909-
__ASSERT_NO_MSG(chan);
910-
__ASSERT_NO_MSG(req);
911-
__ASSERT_NO_MSG(req->func);
912-
__ASSERT_NO_MSG(!chan->req);
913-
914-
LOG_DBG("req %p", req);
915-
916-
return chan_req_send(chan, req);
917-
}
918-
919906
static void att_req_send_process(struct bt_att *att)
920907
{
921908
struct bt_att_req *req = NULL;

0 commit comments

Comments
 (0)