Bluetooth: Fix two minor style issues in HCI code
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Feb 2012 11:06:43 +0000 (12:06 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 11:06:58 +0000 (13:06 +0200)
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);;

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_conn.c
net/bluetooth/hci_core.c

index 3c68e606d5e54be1e183ee9bd72c2f5b99b3dc01..947172bf16219e7d1df1f0efcf9c3c70018c7870 100644 (file)
@@ -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);
index 9d199494bd65325d4b1c3e0335b84857d66bcb94..e1dadeea4c2f34f38a7ff180c1754214bcaff2fc 100644 (file)
@@ -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);