linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <davem@davemloft.net>, <sameo@linux.intel.com>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-wireless@vger.kernel.org>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH net-next] net: nci: remove set-but-not-used variable 'status'
Date: Tue, 29 Jan 2019 14:40:28 +0800	[thread overview]
Message-ID: <20190129064028.7768-1-yuehaibing@huawei.com> (raw)

gcc warning this:
net/nfc/nci/hci.c:373:5:
 warning: variable 'status' set but not used [-Wunused-but-set-variable]

It not used since commit d8cd37ed2fc8 ("NFC: nci: Fix improper
management of HCI return code"), so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/nfc/nci/hci.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index ddfc52a..4debba8 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -370,17 +370,11 @@ static void nci_hci_resp_received(struct nci_dev *ndev, u8 pipe,
 				  u8 result, struct sk_buff *skb)
 {
 	struct nci_conn_info    *conn_info;
-	u8 status = result;
 
 	conn_info = ndev->hci_dev->conn_info;
-	if (!conn_info) {
-		status = NCI_STATUS_REJECTED;
-		goto exit;
-	}
-
-	conn_info->rx_skb = skb;
+	if (conn_info)
+		conn_info->rx_skb = skb;
 
-exit:
 	nci_req_complete(ndev, NCI_STATUS_OK);
 }
 
-- 
2.7.0



             reply	other threads:[~2019-01-29  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29  6:40 YueHaibing [this message]
2019-01-29  7:04 ` [PATCH net-next] net: nci: remove set-but-not-used variable 'status' David Miller

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=20190129064028.7768-1-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).