Skip to contentSkip to conversation

Bluetooth: Fix two minor style issues in HCI code

PATCH New Marcel Holtmann 1 participant 1 message Feb 22, 2012

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Fix two minor style issues in HCI code

WARNING: min() should probably be min_t(__u16, scb->expect, count)
+ len = min(scb->expect, (__u16)count);

WARNING: Statements terminations use 1 semicolon
+ INIT_LIST_HEAD(&conn->chan_list);;

---
 net/bluetooth/hci_conn.c |    2 +-
 net/bluetooth/hci_core.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/hci_conn.c +1 -1
index 3c68e60..947172b 100644
@@ -402,7 +402,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
 
 	skb_queue_head_init(&conn->data_q);
 
-	INIT_LIST_HEAD(&conn->chan_list);;
+	INIT_LIST_HEAD(&conn->chan_list);
 
 	INIT_DELAYED_WORK(&conn->disc_work, hci_conn_timeout);
 	setup_timer(&conn->idle_timer, hci_conn_idle, (unsigned long)conn);
net/bluetooth/hci_core.c +1 -1
index 9d19949..e1dadee 100644
@@ -1957,7 +1957,7 @@ static int hci_reassembly(struct hci_dev *hdev, int type, void *data,
 
 	while (count) {
 		scb = (void *) skb->cb;
-		len = min(scb->expect, (__u16)count);
+		len = min_t(__u16, scb->expect, count);
 
 		memcpy(skb_put(skb, len), data, len);
 
Signature · 1 line
1.7.7.6