Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp861970pxb; Thu, 12 Nov 2020 19:54:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJysNvCvE1+0c9DAh/MYr77AIyUHhT8TRGLQMUf1JaXYS//qdP1XEIJ3WuzfuT6I5OoHudDD X-Received: by 2002:aa7:d9d3:: with SMTP id v19mr527407eds.67.1605239641570; Thu, 12 Nov 2020 19:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605239641; cv=none; d=google.com; s=arc-20160816; b=pD5OB6QNVIHavrh89KiSAqbuBkexlKG2uqYmPVJo1ZZKux2Hp/8bNlCtRlg8AsWR4T I7zXf7H+WfRpncfpbrsxvtm1gjL331ElLMz2cprciXJg+VIIJMS0DBhekaM94prP35G6 HvHcU+WMFCCSV7jGuQ5x4MImKyjZ228GVjJqKQJHwQH1ALRiGwGuVfllSZAhLusEzqax tTfsMMyv3/3KYRGffiMwdOm1HXNtOYBnya0zhp8vbeap1eXBHeAKdZCZEnQnO/5jw9vf 1tHnGT/q/NG8zeKR1FBHomfpOZ74Y7gJ+lz7pJSivxxTvxGAZx2dCpVZfeloNYsU9UVo m/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:message-id:date:subject:cc:from; bh=L+HqFPfVhHa6aD+9yxvJr4n8Fy8b1A0o2i6AjZWrh8U=; b=g902xHtEgRBxaCol/YsMiyxV8gGxR41ck72rIPCeAKIjp6bSoHDiyCRn0XMbNKvr2R nE+nLMF87AmPXL+OOG280bMGjO/rSgGoB9Z4mfN7dCQjmLxARcH36DhEMfrcM0F9w6k2 oSmXruZ9WYcjp/tKjtpHJ+z4v+VOGmdVbPeH0u2n5g3lgm1cZOHPL3iUPFAEPxA+GTt6 LeeVGNNB8Q7sdKfZR9g4swxGA1/non+npP+otsUugnqk2BiawC1ohCkbcLMaeXycO4S4 4Qbei53jXA1YDu9bLIHBpjoHpNoN7NBzOj85E85If0KeNAISQHI/rISqVCkyXQXFdz9T lqoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id um17si5143011ejb.701.2020.11.12.19.53.39; Thu, 12 Nov 2020 19:54:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726237AbgKMDwC (ORCPT + 99 others); Thu, 12 Nov 2020 22:52:02 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:35551 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbgKMDwC (ORCPT ); Thu, 12 Nov 2020 22:52:02 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UF8oyGL_1605239519; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UF8oyGL_1605239519) by smtp.aliyun-inc.com(127.0.0.1); Fri, 13 Nov 2020 11:52:00 +0800 From: Alex Shi Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/nfc/nic: refined function nci_hci_resp_received Date: Fri, 13 Nov 2020 11:51:57 +0800 Message-Id: <1605239517-49707-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't use the parameter result actually, so better to remove it and skip a gcc warning for unused variable. Signed-off-by: Alex Shi Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- net/nfc/nci/hci.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index c18e76d6d8ba..6b275a387a92 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -363,16 +363,13 @@ static void nci_hci_cmd_received(struct nci_dev *ndev, u8 pipe, } static void nci_hci_resp_received(struct nci_dev *ndev, u8 pipe, - u8 result, struct sk_buff *skb) + 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; + if (!conn_info) goto exit; - } conn_info->rx_skb = skb; @@ -388,7 +385,7 @@ static void nci_hci_hcp_message_rx(struct nci_dev *ndev, u8 pipe, { switch (type) { case NCI_HCI_HCP_RESPONSE: - nci_hci_resp_received(ndev, pipe, instruction, skb); + nci_hci_resp_received(ndev, pipe, skb); break; case NCI_HCI_HCP_COMMAND: nci_hci_cmd_received(ndev, pipe, instruction, skb); -- 2.29.GIT