* [PATCH net-next v1 1/1] net: stmmac: Fix mixed enum type warning
@ 2021-06-10 8:53 ` Wong Vee Khee
0 siblings, 0 replies; 4+ messages in thread
From: Wong Vee Khee @ 2021-06-10 8:53 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
The commit 5a5586112b92 ("net: stmmac: support FPE link partner
hand-shaking procedure") introduced the following coverity warning:
"Parse warning (PW.MIXED_ENUM_TYPE)"
"1. mixed_enum_type: enumerated type mixed with another type"
This is due to both "lo_state" and "lp_sate" which their datatype are
enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN"
which is a macro-defined of 0. Fixed this by assigned both these
variables with the correct enum value.
Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure")
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 180f347b4c8e..db97cd4b871d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1021,8 +1021,8 @@ static void stmmac_fpe_link_state_handle(struct stmmac_priv *priv, bool is_up)
if (is_up && *hs_enable) {
stmmac_fpe_send_mpacket(priv, priv->ioaddr, MPACKET_VERIFY);
} else {
- *lo_state = FPE_EVENT_UNKNOWN;
- *lp_state = FPE_EVENT_UNKNOWN;
+ *lo_state = FPE_STATE_OFF;
+ *lp_state = FPE_STATE_OFF;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next v1 1/1] net: stmmac: Fix mixed enum type warning
@ 2021-06-10 8:53 ` Wong Vee Khee
0 siblings, 0 replies; 4+ messages in thread
From: Wong Vee Khee @ 2021-06-10 8:53 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
The commit 5a5586112b92 ("net: stmmac: support FPE link partner
hand-shaking procedure") introduced the following coverity warning:
"Parse warning (PW.MIXED_ENUM_TYPE)"
"1. mixed_enum_type: enumerated type mixed with another type"
This is due to both "lo_state" and "lp_sate" which their datatype are
enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN"
which is a macro-defined of 0. Fixed this by assigned both these
variables with the correct enum value.
Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure")
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 180f347b4c8e..db97cd4b871d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1021,8 +1021,8 @@ static void stmmac_fpe_link_state_handle(struct stmmac_priv *priv, bool is_up)
if (is_up && *hs_enable) {
stmmac_fpe_send_mpacket(priv, priv->ioaddr, MPACKET_VERIFY);
} else {
- *lo_state = FPE_EVENT_UNKNOWN;
- *lp_state = FPE_EVENT_UNKNOWN;
+ *lo_state = FPE_STATE_OFF;
+ *lp_state = FPE_STATE_OFF;
}
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v1 1/1] net: stmmac: Fix mixed enum type warning
2021-06-10 8:53 ` Wong Vee Khee
@ 2021-06-10 21:00 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-10 21:00 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
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 10 Jun 2021 16:53:54 +0800 you wrote:
> The commit 5a5586112b92 ("net: stmmac: support FPE link partner
> hand-shaking procedure") introduced the following coverity warning:
>
> "Parse warning (PW.MIXED_ENUM_TYPE)"
> "1. mixed_enum_type: enumerated type mixed with another type"
>
> This is due to both "lo_state" and "lp_sate" which their datatype are
> enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN"
> which is a macro-defined of 0. Fixed this by assigned both these
> variables with the correct enum value.
>
> [...]
Here is the summary with links:
- [net-next,v1,1/1] net: stmmac: Fix mixed enum type warning
https://git.kernel.org/netdev/net-next/c/1f7096f0fdb2
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] 4+ messages in thread
* Re: [PATCH net-next v1 1/1] net: stmmac: Fix mixed enum type warning
@ 2021-06-10 21:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-10 21:00 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
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 10 Jun 2021 16:53:54 +0800 you wrote:
> The commit 5a5586112b92 ("net: stmmac: support FPE link partner
> hand-shaking procedure") introduced the following coverity warning:
>
> "Parse warning (PW.MIXED_ENUM_TYPE)"
> "1. mixed_enum_type: enumerated type mixed with another type"
>
> This is due to both "lo_state" and "lp_sate" which their datatype are
> enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN"
> which is a macro-defined of 0. Fixed this by assigned both these
> variables with the correct enum value.
>
> [...]
Here is the summary with links:
- [net-next,v1,1/1] net: stmmac: Fix mixed enum type warning
https://git.kernel.org/netdev/net-next/c/1f7096f0fdb2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-10 21:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 8:53 [PATCH net-next v1 1/1] net: stmmac: Fix mixed enum type warning Wong Vee Khee
2021-06-10 8:53 ` Wong Vee Khee
2021-06-10 21:00 ` patchwork-bot+netdevbpf
2021-06-10 21:00 ` 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.