Commit 49b1cabf authored by Alex Shi's avatar Alex Shi Committed by Jakub Kicinski

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: default avatarAlex Shi <alex.shi@linux.alibaba.com>
Link: https://lore.kernel.org/r/1605239517-49707-1-git-send-email-alex.shi@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 508c4fc2
...@@ -363,16 +363,13 @@ static void nci_hci_cmd_received(struct nci_dev *ndev, u8 pipe, ...@@ -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, 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; struct nci_conn_info *conn_info;
u8 status = result;
conn_info = ndev->hci_dev->conn_info; conn_info = ndev->hci_dev->conn_info;
if (!conn_info) { if (!conn_info)
status = NCI_STATUS_REJECTED;
goto exit; goto exit;
}
conn_info->rx_skb = skb; conn_info->rx_skb = skb;
...@@ -388,7 +385,7 @@ static void nci_hci_hcp_message_rx(struct nci_dev *ndev, u8 pipe, ...@@ -388,7 +385,7 @@ static void nci_hci_hcp_message_rx(struct nci_dev *ndev, u8 pipe,
{ {
switch (type) { switch (type) {
case NCI_HCI_HCP_RESPONSE: case NCI_HCI_HCP_RESPONSE:
nci_hci_resp_received(ndev, pipe, instruction, skb); nci_hci_resp_received(ndev, pipe, skb);
break; break;
case NCI_HCI_HCP_COMMAND: case NCI_HCI_HCP_COMMAND:
nci_hci_cmd_received(ndev, pipe, instruction, skb); nci_hci_cmd_received(ndev, pipe, instruction, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment