All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mutharaju, Prasanna (P.)" <mkarthi3@visteon.com>
To: "marcel@holtmann.org" <marcel@holtmann.org>,
	"gustavo@padovan.org" <gustavo@padovan.org>,
	"johan.hedberg@gmail.com" <johan.hedberg@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: [PATCH] Bluetooth: hci_h5: clean up hci_h5 code
Date: Wed, 30 Sep 2015 13:02:05 +0000	[thread overview]
Message-ID: <20150930130159.GA5696@jci-VirtualBox> (raw)

From: Prasanna Karthik <mkarthi3@visteon.com>

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>
---
 drivers/bluetooth/hci_h5.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index b35b238..abee221 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -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

             reply	other threads:[~2015-09-30 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 13:02 Mutharaju, Prasanna (P.) [this message]
2015-09-30 14:13 ` [PATCH] Bluetooth: hci_h5: clean up hci_h5 code Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150930130159.GA5696@jci-VirtualBox \
    --to=mkarthi3@visteon.com \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.