* [PATCH] bnx2x: Remove redundant assignment to err
@ 2021-04-29 10:38 Yang Li
2021-04-29 23:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-04-29 10:38 UTC (permalink / raw)
To: aelior
Cc: skalluru, GR-everest-linux-l2, davem, kuba, nathan, ndesaulniers,
netdev, linux-kernel, clang-built-linux, Yang Li
Variable 'err' is set to -EIO but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.
Clean up the following clang-analyzer warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1195:2: warning: Value
stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 9c2f51f..d21f085 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1192,7 +1192,6 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
return 0;
}
- err = -EIO;
/* verify ari is enabled */
if (!pci_ari_enabled(bp->pdev->bus)) {
BNX2X_ERR("ARI not supported (check pci bridge ARI forwarding), SRIOV can not be enabled\n");
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bnx2x: Remove redundant assignment to err
2021-04-29 10:38 [PATCH] bnx2x: Remove redundant assignment to err Yang Li
@ 2021-04-29 23:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-29 23:00 UTC (permalink / raw)
To: Yang Li
Cc: aelior, skalluru, GR-everest-linux-l2, davem, kuba, nathan,
ndesaulniers, netdev, linux-kernel, clang-built-linux
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Thu, 29 Apr 2021 18:38:25 +0800 you wrote:
> Variable 'err' is set to -EIO but this value is never read as it is
> overwritten with a new value later on, hence it is a redundant
> assignment and can be removed.
>
> Clean up the following clang-analyzer warning:
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1195:2: warning: Value
> stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
>
> [...]
Here is the summary with links:
- bnx2x: Remove redundant assignment to err
https://git.kernel.org/netdev/net/c/8343b1f8b97a
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] 2+ messages in thread
end of thread, other threads:[~2021-04-29 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 10:38 [PATCH] bnx2x: Remove redundant assignment to err Yang Li
2021-04-29 23:00 ` patchwork-bot+netdevbpf
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).