From patchwork Tue Jan 29 06:40:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10785541 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 412D1922 for ; Tue, 29 Jan 2019 06:56:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E5EC2B119 for ; Tue, 29 Jan 2019 06:56:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CCE42B11F; Tue, 29 Jan 2019 06:56:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B79102B119 for ; Tue, 29 Jan 2019 06:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725783AbfA2G4U (ORCPT ); Tue, 29 Jan 2019 01:56:20 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:49100 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725446AbfA2G4U (ORCPT ); Tue, 29 Jan 2019 01:56:20 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3DE4EDE16150E97F5CD0; Tue, 29 Jan 2019 14:40:56 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Tue, 29 Jan 2019 14:40:46 +0800 From: YueHaibing To: , CC: , , , YueHaibing Subject: [PATCH net-next] net: nci: remove set-but-not-used variable 'status' Date: Tue, 29 Jan 2019 14:40:28 +0800 Message-ID: <20190129064028.7768-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); }