* [PATCH net-next] NFC: nci: remove redundant variable 'status'
@ 2018-08-01 7:20 YueHaibing
2018-09-13 12:06 ` YueHaibing
2019-01-17 8:18 ` YueHaibing
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2018-08-01 7:20 UTC (permalink / raw)
To: davem, sameo; +Cc: linux-kernel, netdev, YueHaibing
After commit d8cd37ed2fc8 ("NFC: nci: Fix improper management of HCI return code")
variable 'status' is being assigned but never used,
so can be removed. Also make a trival cleanup.
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] NFC: nci: remove redundant variable 'status'
2018-08-01 7:20 [PATCH net-next] NFC: nci: remove redundant variable 'status' YueHaibing
@ 2018-09-13 12:06 ` YueHaibing
2018-11-12 13:20 ` YueHaibing
2019-01-17 8:18 ` YueHaibing
1 sibling, 1 reply; 4+ messages in thread
From: YueHaibing @ 2018-09-13 12:06 UTC (permalink / raw)
To: davem, sameo; +Cc: linux-kernel, netdev
Ping.
On 2018/8/1 15:20, YueHaibing wrote:
> After commit d8cd37ed2fc8 ("NFC: nci: Fix improper management of HCI return code")
> variable 'status' is being assigned but never used,
> so can be removed. Also make a trival cleanup.
>
> 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);
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] NFC: nci: remove redundant variable 'status'
2018-09-13 12:06 ` YueHaibing
@ 2018-11-12 13:20 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-11-12 13:20 UTC (permalink / raw)
To: davem, sameo; +Cc: linux-kernel, netdev
Ping.
On 2018/9/13 20:06, YueHaibing wrote:
> Ping.
>
> On 2018/8/1 15:20, YueHaibing wrote:
>> After commit d8cd37ed2fc8 ("NFC: nci: Fix improper management of HCI return code")
>> variable 'status' is being assigned but never used,
>> so can be removed. Also make a trival cleanup.
>>
>> 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);
>> }
>>
>>
>
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] NFC: nci: remove redundant variable 'status'
2018-08-01 7:20 [PATCH net-next] NFC: nci: remove redundant variable 'status' YueHaibing
2018-09-13 12:06 ` YueHaibing
@ 2019-01-17 8:18 ` YueHaibing
1 sibling, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-01-17 8:18 UTC (permalink / raw)
To: davem, sameo; +Cc: linux-kernel, netdev
ping ...
On 2018/8/1 15:20, YueHaibing wrote:
> After commit d8cd37ed2fc8 ("NFC: nci: Fix improper management of HCI return code")
> variable 'status' is being assigned but never used,
> so can be removed. Also make a trival cleanup.
>
> 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);
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-17 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 7:20 [PATCH net-next] NFC: nci: remove redundant variable 'status' YueHaibing
2018-09-13 12:06 ` YueHaibing
2018-11-12 13:20 ` YueHaibing
2019-01-17 8:18 ` YueHaibing
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).