aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-23 03:04:21 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:08 -0400
commit8fc9ced398824739d3c25c8aa7f6f34d8e7a49d9 (patch)
tree1ebdf750d6906ff4fc1f1752e8a392aeb9c1e24a
parentc3c7ea65941a0b7a4f1b9655e7aaaab6ce1874d2 (diff)
Bluetooth: Fix coding style in the subsystem
This is some leftover from the last patches that fixed style. It is mostly line over 80 characters fixes reported by checkpatch.pl. checkpatch.pl is clean for these files now. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/bluetooth/af_bluetooth.c3
-rw-r--r--net/bluetooth/hci_conn.c3
-rw-r--r--net/bluetooth/hci_core.c7
-rw-r--r--net/bluetooth/hci_event.c23
-rw-r--r--net/bluetooth/hci_sock.c21
-rw-r--r--net/bluetooth/hci_sysfs.c4
-rw-r--r--net/bluetooth/lib.c2
-rw-r--r--net/bluetooth/mgmt.c12
8 files changed, 48 insertions, 27 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 46e7f86acfc9..e31a20f5b6be 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -418,7 +418,8 @@ static inline unsigned int bt_accept_poll(struct sock *parent)
418 return 0; 418 return 0;
419} 419}
420 420
421unsigned int bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait) 421unsigned int bt_sock_poll(struct file *file, struct socket *sock,
422 poll_table *wait)
422{ 423{
423 struct sock *sk = sock->sk; 424 struct sock *sk = sock->sk;
424 unsigned int mask = 0; 425 unsigned int mask = 0;
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 0d73577b84cb..231fc4400f37 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -453,7 +453,8 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
453 read_lock(&hci_dev_list_lock); 453 read_lock(&hci_dev_list_lock);
454 454
455 list_for_each_entry(d, &hci_dev_list, list) { 455 list_for_each_entry(d, &hci_dev_list, list) {
456 if (!test_bit(HCI_UP, &d->flags) || test_bit(HCI_RAW, &d->flags)) 456 if (!test_bit(HCI_UP, &d->flags) ||
457 test_bit(HCI_RAW, &d->flags))
457 continue; 458 continue;
458 459
459 /* Simple routing: 460 /* Simple routing:
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 2dc61d38bf62..bee425ad25b5 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -622,7 +622,9 @@ int hci_inquiry(void __user *arg)
622 goto done; 622 goto done;
623 } 623 }
624 624
625 /* for unlimited number of responses we will use buffer with 255 entries */ 625 /* for unlimited number of responses we will use buffer with
626 * 255 entries
627 */
626 max_rsp = (ir.num_rsp == 0) ? 255 : ir.num_rsp; 628 max_rsp = (ir.num_rsp == 0) ? 255 : ir.num_rsp;
627 629
628 /* cache_dump can't sleep. Therefore we allocate temp buffer and then 630 /* cache_dump can't sleep. Therefore we allocate temp buffer and then
@@ -2610,7 +2612,8 @@ static void hci_sched_esco(struct hci_dev *hdev)
2610 if (!hci_conn_num(hdev, ESCO_LINK)) 2612 if (!hci_conn_num(hdev, ESCO_LINK))
2611 return; 2613 return;
2612 2614
2613 while (hdev->sco_cnt && (conn = hci_low_sent(hdev, ESCO_LINK, &quote))) { 2615 while (hdev->sco_cnt && (conn = hci_low_sent(hdev, ESCO_LINK,
2616 &quote))) {
2614 while (quote-- && (skb = skb_dequeue(&conn->data_q))) { 2617 while (quote-- && (skb = skb_dequeue(&conn->data_q))) {
2615 BT_DBG("skb %p len %d", skb, skb->len); 2618 BT_DBG("skb %p len %d", skb, skb->len);
2616 hci_send_frame(skb); 2619 hci_send_frame(skb);
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 75b03fc78002..87e6f74af6fe 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -409,7 +409,8 @@ static void hci_cc_read_voice_setting(struct hci_dev *hdev, struct sk_buff *skb)
409 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING); 409 hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
410} 410}
411 411
412static void hci_cc_write_voice_setting(struct hci_dev *hdev, struct sk_buff *skb) 412static void hci_cc_write_voice_setting(struct hci_dev *hdev,
413 struct sk_buff *skb)
413{ 414{
414 __u8 status = *((__u8 *) skb->data); 415 __u8 status = *((__u8 *) skb->data);
415 __u16 setting; 416 __u16 setting;
@@ -648,7 +649,8 @@ static void hci_setup_link_policy(struct hci_dev *hdev)
648 hci_send_cmd(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, sizeof(cp), &cp); 649 hci_send_cmd(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, sizeof(cp), &cp);
649} 650}
650 651
651static void hci_cc_read_local_commands(struct hci_dev *hdev, struct sk_buff *skb) 652static void hci_cc_read_local_commands(struct hci_dev *hdev,
653 struct sk_buff *skb)
652{ 654{
653 struct hci_rp_read_local_commands *rp = (void *) skb->data; 655 struct hci_rp_read_local_commands *rp = (void *) skb->data;
654 656
@@ -666,7 +668,8 @@ done:
666 hci_req_complete(hdev, HCI_OP_READ_LOCAL_COMMANDS, rp->status); 668 hci_req_complete(hdev, HCI_OP_READ_LOCAL_COMMANDS, rp->status);
667} 669}
668 670
669static void hci_cc_read_local_features(struct hci_dev *hdev, struct sk_buff *skb) 671static void hci_cc_read_local_features(struct hci_dev *hdev,
672 struct sk_buff *skb)
670{ 673{
671 struct hci_rp_read_local_features *rp = (void *) skb->data; 674 struct hci_rp_read_local_features *rp = (void *) skb->data;
672 675
@@ -1845,7 +1848,8 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
1845 if (ie) 1848 if (ie)
1846 memcpy(ie->data.dev_class, ev->dev_class, 3); 1849 memcpy(ie->data.dev_class, ev->dev_class, 3);
1847 1850
1848 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); 1851 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type,
1852 &ev->bdaddr);
1849 if (!conn) { 1853 if (!conn) {
1850 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr); 1854 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr);
1851 if (!conn) { 1855 if (!conn) {
@@ -2623,7 +2627,8 @@ static void hci_mode_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
2623 conn->mode = ev->mode; 2627 conn->mode = ev->mode;
2624 conn->interval = __le16_to_cpu(ev->interval); 2628 conn->interval = __le16_to_cpu(ev->interval);
2625 2629
2626 if (!test_and_clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->flags)) { 2630 if (!test_and_clear_bit(HCI_CONN_MODE_CHANGE_PEND,
2631 &conn->flags)) {
2627 if (conn->mode == HCI_CM_ACTIVE) 2632 if (conn->mode == HCI_CM_ACTIVE)
2628 set_bit(HCI_CONN_POWER_SAVE, &conn->flags); 2633 set_bit(HCI_CONN_POWER_SAVE, &conn->flags);
2629 else 2634 else
@@ -2714,8 +2719,8 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
2714 2719
2715 if (key->type == HCI_LK_COMBINATION && key->pin_len < 16 && 2720 if (key->type == HCI_LK_COMBINATION && key->pin_len < 16 &&
2716 conn->pending_sec_level == BT_SECURITY_HIGH) { 2721 conn->pending_sec_level == BT_SECURITY_HIGH) {
2717 BT_DBG("%s ignoring key unauthenticated for high \ 2722 BT_DBG("%s ignoring key unauthenticated for high security",
2718 security", hdev->name); 2723 hdev->name);
2719 goto not_found; 2724 goto not_found;
2720 } 2725 }
2721 2726
@@ -3097,8 +3102,8 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
3097 conn->auth_type = hci_get_auth_req(conn); 3102 conn->auth_type = hci_get_auth_req(conn);
3098 cp.authentication = conn->auth_type; 3103 cp.authentication = conn->auth_type;
3099 3104
3100 if ((conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)) && 3105 if (hci_find_remote_oob_data(hdev, &conn->dst) &&
3101 hci_find_remote_oob_data(hdev, &conn->dst)) 3106 (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)))
3102 cp.oob_data = 0x01; 3107 cp.oob_data = 0x01;
3103 else 3108 else
3104 cp.oob_data = 0x00; 3109 cp.oob_data = 0x00;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index c1e0c3df5e6c..9d8e1c39955e 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -241,7 +241,8 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb)
241 struct hci_mon_hdr *hdr; 241 struct hci_mon_hdr *hdr;
242 242
243 /* Create a private copy with headroom */ 243 /* Create a private copy with headroom */
244 skb_copy = __pskb_copy(skb, HCI_MON_HDR_SIZE, GFP_ATOMIC); 244 skb_copy = __pskb_copy(skb, HCI_MON_HDR_SIZE,
245 GFP_ATOMIC);
245 if (!skb_copy) 246 if (!skb_copy)
246 continue; 247 continue;
247 248
@@ -542,7 +543,8 @@ static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd,
542 } 543 }
543} 544}
544 545
545static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) 546static int hci_sock_ioctl(struct socket *sock, unsigned int cmd,
547 unsigned long arg)
546{ 548{
547 struct sock *sk = sock->sk; 549 struct sock *sk = sock->sk;
548 void __user *argp = (void __user *) arg; 550 void __user *argp = (void __user *) arg;
@@ -603,7 +605,8 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long a
603 } 605 }
604} 606}
605 607
606static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) 608static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
609 int addr_len)
607{ 610{
608 struct sockaddr_hci haddr; 611 struct sockaddr_hci haddr;
609 struct sock *sk = sock->sk; 612 struct sock *sk = sock->sk;
@@ -692,7 +695,8 @@ done:
692 return err; 695 return err;
693} 696}
694 697
695static int hci_sock_getname(struct socket *sock, struct sockaddr *addr, int *addr_len, int peer) 698static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
699 int *addr_len, int peer)
696{ 700{
697 struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr; 701 struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr;
698 struct sock *sk = sock->sk; 702 struct sock *sk = sock->sk;
@@ -720,7 +724,8 @@ static void hci_sock_cmsg(struct sock *sk, struct msghdr *msg,
720 724
721 if (mask & HCI_CMSG_DIR) { 725 if (mask & HCI_CMSG_DIR) {
722 int incoming = bt_cb(skb)->incoming; 726 int incoming = bt_cb(skb)->incoming;
723 put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(incoming), &incoming); 727 put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(incoming),
728 &incoming);
724 } 729 }
725 730
726 if (mask & HCI_CMSG_TSTAMP) { 731 if (mask & HCI_CMSG_TSTAMP) {
@@ -895,7 +900,8 @@ drop:
895 goto done; 900 goto done;
896} 901}
897 902
898static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int len) 903static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
904 char __user *optval, unsigned int len)
899{ 905{
900 struct hci_ufilter uf = { .opcode = 0 }; 906 struct hci_ufilter uf = { .opcode = 0 };
901 struct sock *sk = sock->sk; 907 struct sock *sk = sock->sk;
@@ -977,7 +983,8 @@ done:
977 return err; 983 return err;
978} 984}
979 985
980static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) 986static int hci_sock_getsockopt(struct socket *sock, int level, int optname,
987 char __user *optval, int __user *optlen)
981{ 988{
982 struct hci_ufilter uf; 989 struct hci_ufilter uf;
983 struct sock *sk = sock->sk; 990 struct sock *sk = sock->sk;
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 847a8445c53c..ee8d9ea6bf3c 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -220,8 +220,8 @@ static ssize_t show_class(struct device *dev,
220 struct device_attribute *attr, char *buf) 220 struct device_attribute *attr, char *buf)
221{ 221{
222 struct hci_dev *hdev = to_hci_dev(dev); 222 struct hci_dev *hdev = to_hci_dev(dev);
223 return sprintf(buf, "0x%.2x%.2x%.2x\n", 223 return sprintf(buf, "0x%.2x%.2x%.2x\n", hdev->dev_class[2],
224 hdev->dev_class[2], hdev->dev_class[1], hdev->dev_class[0]); 224 hdev->dev_class[1], hdev->dev_class[0]);
225} 225}
226 226
227static ssize_t show_address(struct device *dev, 227static ssize_t show_address(struct device *dev,
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index 506628876f36..994bc3c7ddc7 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -31,7 +31,7 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/stddef.h> 32#include <linux/stddef.h>
33#include <linux/string.h> 33#include <linux/string.h>
34#include <asm/errno.h> 34#include <linux/errno.h>
35 35
36#include <net/bluetooth/bluetooth.h> 36#include <net/bluetooth/bluetooth.h>
37 37
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index df03c7d20331..984afe4ef407 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -714,7 +714,8 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
714} 714}
715 715
716static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, 716static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
717 void (*cb)(struct pending_cmd *cmd, void *data), 717 void (*cb)(struct pending_cmd *cmd,
718 void *data),
718 void *data) 719 void *data)
719{ 720{
720 struct list_head *p, *n; 721 struct list_head *p, *n;
@@ -1594,7 +1595,8 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data,
1594 } 1595 }
1595 1596
1596 if (cp->addr.type == BDADDR_BREDR) 1597 if (cp->addr.type == BDADDR_BREDR)
1597 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->addr.bdaddr); 1598 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK,
1599 &cp->addr.bdaddr);
1598 else 1600 else
1599 conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); 1601 conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr);
1600 1602
@@ -3226,7 +3228,8 @@ int mgmt_user_confirm_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr,
3226 u8 link_type, u8 addr_type, u8 status) 3228 u8 link_type, u8 addr_type, u8 status)
3227{ 3229{
3228 return user_pairing_resp_complete(hdev, bdaddr, link_type, addr_type, 3230 return user_pairing_resp_complete(hdev, bdaddr, link_type, addr_type,
3229 status, MGMT_OP_USER_CONFIRM_NEG_REPLY); 3231 status,
3232 MGMT_OP_USER_CONFIRM_NEG_REPLY);
3230} 3233}
3231 3234
3232int mgmt_user_passkey_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, 3235int mgmt_user_passkey_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr,
@@ -3240,7 +3243,8 @@ int mgmt_user_passkey_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr,
3240 u8 link_type, u8 addr_type, u8 status) 3243 u8 link_type, u8 addr_type, u8 status)
3241{ 3244{
3242 return user_pairing_resp_complete(hdev, bdaddr, link_type, addr_type, 3245 return user_pairing_resp_complete(hdev, bdaddr, link_type, addr_type,
3243 status, MGMT_OP_USER_PASSKEY_NEG_REPLY); 3246 status,
3247 MGMT_OP_USER_PASSKEY_NEG_REPLY);
3244} 3248}
3245 3249
3246int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, 3250int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,