* [PATCH][next] octeontx2-af: Remove redundant initialization of variable blkaddr
@ 2021-09-17 12:03 Colin King
2021-09-17 13:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-17 12:03 UTC (permalink / raw)
To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
hariprasad, Subbaraya Sundeep, David S . Miller, Jakub Kicinski,
netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable blkaddr is being initialized with a value that is never
read, it is being updated later on in a for-loop. The assignment is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 3bba8bc91f35..5909173ff788 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -1294,7 +1294,7 @@ int rvu_get_blkaddr_from_slot(struct rvu *rvu, int blktype, u16 pcifunc,
int numlfs, total_lfs = 0, nr_blocks = 0;
int i, num_blkaddr[BLK_COUNT] = { 0 };
struct rvu_block *block;
- int blkaddr = -ENODEV;
+ int blkaddr;
u16 start_slot;
if (!is_blktype_attached(pfvf, blktype))
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] octeontx2-af: Remove redundant initialization of variable blkaddr
2021-09-17 12:03 [PATCH][next] octeontx2-af: Remove redundant initialization of variable blkaddr Colin King
@ 2021-09-17 13:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-17 13:10 UTC (permalink / raw)
To: Colin King
Cc: sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta, davem, kuba,
netdev, kernel-janitors, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Fri, 17 Sep 2021 13:03:33 +0100 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable blkaddr is being initialized with a value that is never
> read, it is being updated later on in a for-loop. The assignment is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> [...]
Here is the summary with links:
- [next] octeontx2-af: Remove redundant initialization of variable blkaddr
https://git.kernel.org/netdev/net-next/c/3503e673db23
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-09-17 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 12:03 [PATCH][next] octeontx2-af: Remove redundant initialization of variable blkaddr Colin King
2021-09-17 13:10 ` 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).