* [PATCH net-next] wimax/i2400m/control: Mark expected switch fall-through
@ 2019-04-24 16:20 Gustavo A. R. Silva
2019-04-26 15:29 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-24 16:20 UTC (permalink / raw)
To: Inaky Perez-Gonzalez, linux-wimax@intel.com David S. Miller
Cc: netdev, linux-kernel, Gustavo A. R. Silva, Kees Cook
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
This patch fixes the following warning:
In file included from drivers/net/wimax/i2400m/debug-levels.h:30,
from drivers/net/wimax/i2400m/control.c:86:
drivers/net/wimax/i2400m/control.c: In function ‘i2400m_report_tlv_system_state’:
./include/linux/wimax/debug.h:200:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
do { \
^
./include/linux/wimax/debug.h:404:36: note: in expansion of macro ‘_d_printf’
#define d_printf(l, _dev, f, a...) _d_printf(l, "", _dev, f, ## a)
^~~~~~~~~
drivers/net/wimax/i2400m/control.c:354:3: note: in expansion of macro ‘d_printf’
d_printf(1, dev, "entering BS-negotiated idle mode\n");
^~~~~~~~
drivers/net/wimax/i2400m/control.c:355:2: note: here
case I2400M_SS_DISCONNECTING:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/wimax/i2400m/control.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index ef298d8525c5..4fe7c7e132c4 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -352,6 +352,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m,
case I2400M_SS_IDLE:
d_printf(1, dev, "entering BS-negotiated idle mode\n");
+ /* Fall through */
case I2400M_SS_DISCONNECTING:
case I2400M_SS_DATA_PATH_CONNECTED:
wimax_state_change(wimax_dev, WIMAX_ST_CONNECTED);
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] wimax/i2400m/control: Mark expected switch fall-through
2019-04-24 16:20 [PATCH net-next] wimax/i2400m/control: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-04-26 15:29 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-26 15:29 UTC (permalink / raw)
To: gustavo; +Cc: inaky.perez-gonzalez, netdev, linux-kernel, keescook
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Wed, 24 Apr 2019 11:20:16 -0500
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warning:
...
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-26 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 16:20 [PATCH net-next] wimax/i2400m/control: Mark expected switch fall-through Gustavo A. R. Silva
2019-04-26 15:29 ` David Miller
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).