Bluetooth: Fix coding style in include/net/bluetooth

Fix all warning and errors reported by checkpatch but license trailing
whitespace and bdaddr_t definition.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Gustavo Padovan
2012-05-23 04:04:20 -03:00
committed by Johan Hedberg
parent fc5fef615a
commit c3c7ea6594
3 changed files with 23 additions and 19 deletions

View File

@ -25,7 +25,7 @@
#ifndef __BLUETOOTH_H #ifndef __BLUETOOTH_H
#define __BLUETOOTH_H #define __BLUETOOTH_H
#include <asm/types.h> #include <linux/types.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/poll.h> #include <linux/poll.h>
@ -249,7 +249,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
{ {
struct sk_buff *skb; struct sk_buff *skb;
if ((skb = alloc_skb(len + BT_SKB_RESERVE, how))) { skb = alloc_skb(len + BT_SKB_RESERVE, how);
if (skb) {
skb_reserve(skb, BT_SKB_RESERVE); skb_reserve(skb, BT_SKB_RESERVE);
bt_cb(skb)->incoming = 0; bt_cb(skb)->incoming = 0;
} }
@ -261,7 +262,8 @@ static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
{ {
struct sk_buff *skb; struct sk_buff *skb;
if ((skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err))) { skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err);
if (skb) {
skb_reserve(skb, BT_SKB_RESERVE); skb_reserve(skb, BT_SKB_RESERVE);
bt_cb(skb)->incoming = 0; bt_cb(skb)->incoming = 0;
} }

View File

@ -1309,12 +1309,12 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb)
} }
/* Command opcode pack/unpack */ /* Command opcode pack/unpack */
#define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) #define hci_opcode_pack(ogf, ocf) ((__u16) ((ocf & 0x03ff)|(ogf << 10)))
#define hci_opcode_ogf(op) (op >> 10) #define hci_opcode_ogf(op) (op >> 10)
#define hci_opcode_ocf(op) (op & 0x03ff) #define hci_opcode_ocf(op) (op & 0x03ff)
/* ACL handle and flags pack/unpack */ /* ACL handle and flags pack/unpack */
#define hci_handle_pack(h, f) (__u16) ((h & 0x0fff)|(f << 12)) #define hci_handle_pack(h, f) ((__u16) ((h & 0x0fff)|(f << 12)))
#define hci_handle(h) (h & 0x0fff) #define hci_handle(h) (h & 0x0fff)
#define hci_flags(h) (h >> 12) #define hci_flags(h) (h >> 12)

View File

@ -360,7 +360,8 @@ extern int l2cap_connect_cfm(struct hci_conn *hcon, u8 status);
extern int l2cap_disconn_ind(struct hci_conn *hcon); extern int l2cap_disconn_ind(struct hci_conn *hcon);
extern int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason); extern int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason);
extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt); extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt);
extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags); extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb,
u16 flags);
extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);
extern int sco_connect_cfm(struct hci_conn *hcon, __u8 status); extern int sco_connect_cfm(struct hci_conn *hcon, __u8 status);
@ -429,8 +430,8 @@ enum {
static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
{ {
struct hci_dev *hdev = conn->hdev; struct hci_dev *hdev = conn->hdev;
return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) && return test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) &&
test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); test_bit(HCI_CONN_SSP_ENABLED, &conn->flags);
} }
static inline void hci_conn_hash_init(struct hci_dev *hdev) static inline void hci_conn_hash_init(struct hci_dev *hdev)
@ -661,7 +662,8 @@ int hci_get_conn_info(struct hci_dev *hdev, void __user *arg);
int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); int hci_get_auth_info(struct hci_dev *hdev, void __user *arg);
int hci_inquiry(void __user *arg); int hci_inquiry(void __user *arg);
struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr); struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev,
bdaddr_t *bdaddr);
int hci_blacklist_clear(struct hci_dev *hdev); int hci_blacklist_clear(struct hci_dev *hdev);
int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);