platform/x86: dell-laptop: Mark expected switch fall-throughs
PATCH 1/1 platform/x86: dell-laptop: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
--- drivers/platform/x86/dell-laptop.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/dell-laptop.c +2 -0
@@ -1565,8 +1565,10 @@ static ssize_t kbd_led_timeout_store(struct device *dev,switch (unit) {case KBD_TIMEOUT_DAYS : value *=24 ; +/* fall through */ case KBD_TIMEOUT_HOURS : value *=60 ; +/* fall through */ case KBD_TIMEOUT_MINUTES : value *=60 ; unit =KBD_TIMEOUT_SECONDS ;
Signature · 1 line
2.7.4
Quoted 4 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>
I've applied this patch, but not the acer or sony fall through patches due to the pending questions there. Happy to revisit those as needed, but closing these out of the patch queue.
Quoted 23 lines
--- drivers/platform/x86/dell-laptop.c | 2 ++ 1 file changed, 2 insertions(+)drivers/platform/x86/dell-laptop.c +2
-0@@ -1565,8 +1565,10 @@ static ssize_t kbd_led_timeout_store(struct device *dev,switch (unit) {case KBD_TIMEOUT_DAYS : value *=24 ; +/* fall through */ case KBD_TIMEOUT_HOURS : value *=60 ; +/* fall through */ case KBD_TIMEOUT_MINUTES : value *=60 ; unit =KBD_TIMEOUT_SECONDS ;Signature · 1 line
2.7.4
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Quoted 10 lines · Darren Hart
Quoted 4 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>I've applied this patch, but not the acer or sony fall through patches due to the pending questions there. Happy to revisit those as needed, but closing these out of the patch queue.
Thanks, Darren.
I'll send separate patches for those that are still pending. Hopefully, I'll get some feedback this time.
--
Gustavo
Quoted 24 lines
Quoted 23 lines
--- drivers/platform/x86/dell-laptop.c | 2 ++ 1 file changed, 2 insertions(+)drivers/platform/x86/dell-laptop.c +2
-0@@ -1565,8 +1565,10 @@ static ssize_t kbd_led_timeout_store(struct device *dev,switch (unit) {case KBD_TIMEOUT_DAYS : value *=24 ; +/* fall through */ case KBD_TIMEOUT_HOURS : value *=60 ; +/* fall through */ case KBD_TIMEOUT_MINUTES : value *=60 ; unit =KBD_TIMEOUT_SECONDS ;Signature · 1 line
2.7.4