Bluetooth: hci_h5: clean up hci_h5 code
PATCH 1/1 Bluetooth: hci_h5: clean up hci_h5 code
From: Prasanna Karthik <[email protected]>
This patch fixes checkpatch warnings:
- Comparison to NULL could be re-written
- no space required after a cast
--- drivers/bluetooth/hci_h5.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/bluetooth/hci_h5.c +1 -1
@@ -128,7 +128,7 @@ static void h5_timed_event(unsigned long arg) { const unsigned char sync_req[] =3D { 0x01, 0x7e }; unsigned char conf_req[] =3D { 0x03, 0xfc, 0x01 }; - struct hci_uart *hu =3D (struct hci_uart *) arg; + struct hci_uart *hu =3D (struct hci_uart *)arg; struct h5 *h5 =3D hu->priv;struct sk_buff *skb;unsigned long flags;
@@ -210,7 +210,7 @@ static int h5_open(struct hci_uart *hu)
=20
init_timer(&h5->timer);
h5->timer.function =3D h5_timed_event;
- h5->timer.data =3D (unsigned long) hu;
+ h5->timer.data =3D (unsigned long)hu;
=20
h5->tx_win =3D H5_TX_WIN_MAX;
=20
@@ -453,7 +453,7 @@ static int h5_rx_pkt_start(struct hci_uart *hu, unsigne= d char c)
return -ENOMEM;
}
=20
- h5->rx_skb->dev =3D (void *) hu->hdev;
+ h5->rx_skb->dev =3D (void *)hu->hdev;
=20
return 0;
}
@@ -696,7 +696,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu)
}
=20
skb =3D skb_dequeue(&h5->unrel);
- if (skb !=3D NULL) {
+ if (skb) {
nskb =3D h5_prepare_pkt(hu, bt_cb(skb)->pkt_type,
skb->data, skb->len);
if (nskb) {
@@ -714,7 +714,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu)
goto unlock;
=20
skb =3D skb_dequeue(&h5->rel);
- if (skb !=3D NULL) {
+ if (skb) {
nskb =3D h5_prepare_pkt(hu, bt_cb(skb)->pkt_type,
skb->data, skb->len);
if (nskb) {
--=20
1.9.1
Marcel Holtmann
maintainerHi Prasanna,
Quoted 8 lines
This patch fixes checkpatch warnings:
- Comparison to NULL could be re-written
- no space required after a castSigned-off-by Prasanna Karthik <[email protected]>---
drivers/bluetooth/hci_h5.c| 10 +++++-----1 file changed, 5 insertions(+), 5 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel