summaryrefslogtreecommitdiff
path: root/net/nfc
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linux.alibaba.com>2020-11-13 06:51:57 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-15 03:53:16 +0300
commit49b1cabffbf930f2ee77e2834fdd61be2037ab79 (patch)
treec4254de183af16273365cd0b4549f941eac3757c /net/nfc
parent508c4fc27ba7375803e664a2ef0d4212763462d0 (diff)
downloadlinux-49b1cabffbf930f2ee77e2834fdd61be2037ab79.tar.xz
nfc: refined function nci_hci_resp_received
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 <alex.shi@linux.alibaba.com> Link: https://lore.kernel.org/r/1605239517-49707-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/nci/hci.c9
1 files 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 @@ exit:
}
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);