* [PATCH net-next v1 1/1] net: stmmac: Fix unused values warnings
@ 2021-06-11 7:11 Wong Vee Khee
2021-06-11 20:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Wong Vee Khee @ 2021-06-11 7:11 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Jakub Kicinski, Maxime Coquelin
Cc: Joakim Zhang, netdev, linux-stm32, linux-arm-kernel,
linux-kernel, Ong Boon Leong, Voon Wei Feng
The commit 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines
for mac, safety, RX & TX") introduced the converity warnings:-
1. Unused value (UNUSED_VALUE)
assigned_value: Assigning value REQ_IRQ_ERR_MAC to irq_err here,
but that stored value is not used.
2. Unused value (UNUSED_VALUE)
assigned_value: Assigning value REQ_IRQ_ERR_NO to irq_err here,
but that stored value is overwritten before it can used.
3. Unused value (UNUSED_VALUE)
assigned_value: Assigning value REQ_IRQ_ERR_WOL to irq_err here,
but that stored value is not used.
Fixed these by removing the unnecessary value assignments.
Fixes: 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX")
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index db97cd4b871d..4177fd6a9db5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3406,8 +3406,8 @@ static void stmmac_free_irq(struct net_device *dev,
static int stmmac_request_irq_multi_msi(struct net_device *dev)
{
- enum request_irq_err irq_err = REQ_IRQ_ERR_NO;
struct stmmac_priv *priv = netdev_priv(dev);
+ enum request_irq_err irq_err;
cpumask_t cpu_mask;
int irq_idx = 0;
char *int_name;
@@ -3554,8 +3554,8 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
static int stmmac_request_irq_single(struct net_device *dev)
{
- enum request_irq_err irq_err = REQ_IRQ_ERR_NO;
struct stmmac_priv *priv = netdev_priv(dev);
+ enum request_irq_err irq_err;
int ret;
ret = request_irq(dev->irq, stmmac_interrupt,
@@ -3565,7 +3565,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
"%s: ERROR: allocating the IRQ %d (error: %d)\n",
__func__, dev->irq, ret);
irq_err = REQ_IRQ_ERR_MAC;
- return ret;
+ goto irq_error;
}
/* Request the Wake IRQ in case of another line
@@ -3579,7 +3579,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
"%s: ERROR: allocating the WoL IRQ %d (%d)\n",
__func__, priv->wol_irq, ret);
irq_err = REQ_IRQ_ERR_WOL;
- return ret;
+ goto irq_error;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v1 1/1] net: stmmac: Fix unused values warnings
2021-06-11 7:11 [PATCH net-next v1 1/1] net: stmmac: Fix unused values warnings Wong Vee Khee
@ 2021-06-11 20:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-11 20:10 UTC (permalink / raw)
To: Wong Vee Khee
Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
mcoquelin.stm32, qiangqing.zhang, netdev, linux-stm32,
linux-arm-kernel, linux-kernel, boon.leong.ong, weifeng.voon
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Fri, 11 Jun 2021 15:11:43 +0800 you wrote:
> The commit 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines
> for mac, safety, RX & TX") introduced the converity warnings:-
>
> 1. Unused value (UNUSED_VALUE)
> assigned_value: Assigning value REQ_IRQ_ERR_MAC to irq_err here,
> but that stored value is not used.
>
> [...]
Here is the summary with links:
- [net-next,v1,1/1] net: stmmac: Fix unused values warnings
https://git.kernel.org/netdev/net-next/c/3e6dc7b65025
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-06-11 20:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 7:11 [PATCH net-next v1 1/1] net: stmmac: Fix unused values warnings Wong Vee Khee
2021-06-11 20: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).