Skip to contentSkip to conversation

Bluetooth: Remove redundant check for req.cmd_q

PATCH In review Johan Hedberg 2 participants 2 messages Nov 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Remove redundant check for req.cmd_q

From: Johan Hedberg <[email protected]>

The hci_req_run() function already checks for empty cmd_q and bails out if necessary. Also, req.cmd_q should really be treated as private data of the request and not accessed directly.

---
 net/bluetooth/hci_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/hci_request.c +1 -2
index edf2199de4ff..f1529d7740f6 100644
@@ -1187,8 +1187,7 @@ static void adv_timeout_expire(struct work_struct *work)
 	if (list_empty(&hdev->adv_instances))
 		__hci_req_disable_advertising(&req);
 
-	if (!skb_queue_empty(&req.cmd_q))
-		hci_req_run(&req, NULL);
+	hci_req_run(&req, NULL);
 
 unlock:
 	hci_dev_unlock(hdev);
Signature · 1 line
2.5.0
maintainer
#1 lore raw

Hi Johan,

Quoted 8 lines

The hci_req_run() function already checks for empty cmd_q and bails out if necessary. Also, req.cmd_q should really be treated as private data of the request and not accessed directly.

---
net/bluetooth/hci_request.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel