netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] myri10ge: remove redundant assignment to variable status
@ 2022-04-18 14:37 Colin Ian King
  2022-04-22  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-04-18 14:37 UTC (permalink / raw)
  To: Chris Lee, David S . Miller, Jakub Kicinski, Paolo Abeni, netdev
  Cc: kernel-janitors, linux-kernel, llvm

Variable status is being assigned a value that is never read, it is
being re-assigned again later on. The assignment is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/net/ethernet/myricom/myri10ge/myri10ge.c:582:7: warning: Although
the value stored to 'status' is used in the enclosing expression, the
value is never actually read from 'status' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 21d2645885ce..fe5e77330f5f 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -579,7 +579,7 @@ static int myri10ge_load_hotplug_firmware(struct myri10ge_priv *mgp, u32 * size)
 	int status;
 	unsigned i;
 
-	if ((status = request_firmware(&fw, mgp->fw_name, dev)) < 0) {
+	if (request_firmware(&fw, mgp->fw_name, dev) < 0) {
 		dev_err(dev, "Unable to load %s firmware image via hotplug\n",
 			mgp->fw_name);
 		status = -EINVAL;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] myri10ge: remove redundant assignment to variable status
  2022-04-18 14:37 [PATCH] myri10ge: remove redundant assignment to variable status Colin Ian King
@ 2022-04-22  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-22  9:30 UTC (permalink / raw)
  To: Colin Ian King
  Cc: christopher.lee, davem, kuba, pabeni, netdev, kernel-janitors,
	linux-kernel, llvm

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 18 Apr 2022 15:37:59 +0100 you wrote:
> Variable status is being assigned a value that is never read, it is
> being re-assigned again later on. The assignment is redundant and can
> be removed.
> 
> Cleans up clang scan build warning:
> drivers/net/ethernet/myricom/myri10ge/myri10ge.c:582:7: warning: Although
> the value stored to 'status' is used in the enclosing expression, the
> value is never actually read from 'status' [deadcode.DeadStores]
> 
> [...]

Here is the summary with links:
  - myri10ge: remove redundant assignment to variable status
    https://git.kernel.org/netdev/net-next/c/1c604f91b773

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:[~2022-04-22  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-18 14:37 [PATCH] myri10ge: remove redundant assignment to variable status Colin Ian King
2022-04-22  9:30 ` 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).