Bluetooth: hci_h5: clean up hci_h5 code

This patch fixes checkpatch warnings:
- Comparison to NULL could be re-written
- no space required after a cast

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Prasanna Karthik 2015-09-30 13:02:05 +00:00 committed by Marcel Holtmann
parent 239ede3c02
commit 4a2fa2b8a8

View File

@ -128,7 +128,7 @@ static void h5_timed_event(unsigned long arg)
{ {
const unsigned char sync_req[] = { 0x01, 0x7e }; const unsigned char sync_req[] = { 0x01, 0x7e };
unsigned char conf_req[] = { 0x03, 0xfc, 0x01 }; unsigned char conf_req[] = { 0x03, 0xfc, 0x01 };
struct hci_uart *hu = (struct hci_uart *) arg; struct hci_uart *hu = (struct hci_uart *)arg;
struct h5 *h5 = hu->priv; struct h5 *h5 = hu->priv;
struct sk_buff *skb; struct sk_buff *skb;
unsigned long flags; unsigned long flags;
@ -210,7 +210,7 @@ static int h5_open(struct hci_uart *hu)
init_timer(&h5->timer); init_timer(&h5->timer);
h5->timer.function = h5_timed_event; h5->timer.function = h5_timed_event;
h5->timer.data = (unsigned long) hu; h5->timer.data = (unsigned long)hu;
h5->tx_win = H5_TX_WIN_MAX; h5->tx_win = H5_TX_WIN_MAX;
@ -453,7 +453,7 @@ static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c)
return -ENOMEM; return -ENOMEM;
} }
h5->rx_skb->dev = (void *) hu->hdev; h5->rx_skb->dev = (void *)hu->hdev;
return 0; return 0;
} }
@ -696,7 +696,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu)
} }
skb = skb_dequeue(&h5->unrel); skb = skb_dequeue(&h5->unrel);
if (skb != NULL) { if (skb) {
nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type, nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type,
skb->data, skb->len); skb->data, skb->len);
if (nskb) { if (nskb) {
@ -714,7 +714,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu)
goto unlock; goto unlock;
skb = skb_dequeue(&h5->rel); skb = skb_dequeue(&h5->rel);
if (skb != NULL) { if (skb) {
nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type, nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type,
skb->data, skb->len); skb->data, skb->len);
if (nskb) { if (nskb) {