* [PATCH] nfc: st21nfca: remove redundant assignment to variable i
@ 2021-12-30 16:12 Colin Ian King
2021-12-30 19:58 ` Krzysztof Kozlowski
2021-12-31 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2021-12-30 16:12 UTC (permalink / raw)
To: Krzysztof Kozlowski, David S . Miller, netdev
Cc: kernel-janitors, llvm, linux-kernel
Variable i is being assigned a value that is never read, the
assignment is redundant and can be removed. Cleans up clang-scan
build warning:
drivers/nfc/st21nfca/i2c.c:319:4: warning: Value stored to 'i'
is never read [deadcode.DeadStores]
i = 0;
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/nfc/st21nfca/i2c.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index f126ce96a7df..05157fc0f4eb 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -315,10 +315,8 @@ static int st21nfca_hci_i2c_repack(struct sk_buff *skb)
skb_pull(skb, 1);
r = check_crc(skb->data, skb->len);
- if (r != 0) {
- i = 0;
+ if (r != 0)
return -EBADMSG;
- }
/* remove headbyte */
skb_pull(skb, 1);
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfc: st21nfca: remove redundant assignment to variable i
2021-12-30 16:12 [PATCH] nfc: st21nfca: remove redundant assignment to variable i Colin Ian King
@ 2021-12-30 19:58 ` Krzysztof Kozlowski
2021-12-31 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-12-30 19:58 UTC (permalink / raw)
To: Colin Ian King, David S . Miller, netdev
Cc: kernel-janitors, llvm, linux-kernel
On 30/12/2021 17:12, Colin Ian King wrote:
> Variable i is being assigned a value that is never read, the
> assignment is redundant and can be removed. Cleans up clang-scan
> build warning:
>
> drivers/nfc/st21nfca/i2c.c:319:4: warning: Value stored to 'i'
> is never read [deadcode.DeadStores]
> i = 0;
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/nfc/st21nfca/i2c.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfc: st21nfca: remove redundant assignment to variable i
2021-12-30 16:12 [PATCH] nfc: st21nfca: remove redundant assignment to variable i Colin Ian King
2021-12-30 19:58 ` Krzysztof Kozlowski
@ 2021-12-31 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-31 2:30 UTC (permalink / raw)
To: Colin Ian King
Cc: krzysztof.kozlowski, davem, netdev, kernel-janitors, llvm, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 30 Dec 2021 16:12:30 +0000 you wrote:
> Variable i is being assigned a value that is never read, the
> assignment is redundant and can be removed. Cleans up clang-scan
> build warning:
>
> drivers/nfc/st21nfca/i2c.c:319:4: warning: Value stored to 'i'
> is never read [deadcode.DeadStores]
> i = 0;
>
> [...]
Here is the summary with links:
- nfc: st21nfca: remove redundant assignment to variable i
https://git.kernel.org/netdev/net-next/c/314fbde95769
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-31 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 16:12 [PATCH] nfc: st21nfca: remove redundant assignment to variable i Colin Ian King
2021-12-30 19:58 ` Krzysztof Kozlowski
2021-12-31 2:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.