HID: wacom: Mark expected switch fall-through
Subsystems (2)
PATCH 1/1 HID: wacom: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/hid/wacom_wac.c: In function ‘wacom_setup_pen_input_capabilities’:drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
__clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/hid/wacom_wac.c:3508:2: note: here
case WACOM_MO:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
--- drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/wacom_wac.c +1 -0
@@ -3504,6 +3504,7 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,switch (features->type) {case GRAPHIRE_BT :__clear_bit (ABS_MISC , input_dev->absbit); +/* fall through */ case WACOM_MO :case WACOM_G4 :
Signature · 1 line
2.20.1
Jiri Kosina
maintainerQuoted 13 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/hid/wacom_wac.c: In function ‘wacom_setup_pen_input_capabilities’:drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through [-Wimplicit-fallthrough=]__clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/wacom_wac.c:3508:2: note: here
caseWACOM_MO:
^~~~
Quoted 6 lines
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 <[email protected]>
Let's CC Jason and Ping to make sure it's really intended :)
Quoted 19 lines
--- drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+)drivers/hid/wacom_wac.c +1
-0@@ -3504,6 +3504,7 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,switch (features->type) {case GRAPHIRE_BT :__clear_bit (ABS_MISC , input_dev->absbit); +/* fall through */ case WACOM_MO :case WACOM_G4 :Signature · 1 line
2.20.1
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 15 lines · Jiri Kosina
Quoted 13 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/hid/wacom_wac.c: In function ‘wacom_setup_pen_input_capabilities’:drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through [-Wimplicit-fallthrough=]__clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/wacom_wac.c:3508:2: note: here
caseWACOM_MO:
^~~~
Quoted 9 lines
Quoted 6 lines
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 <[email protected]>Let's CC Jason and Ping to make sure it's really intended :)
Sounds great.
Thanks, Jiri.
--
Gustavo
Quoted 20 lines
Quoted 19 lines
--- drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+)drivers/hid/wacom_wac.c +1
-0@@ -3504,6 +3504,7 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,switch (features->type) {case GRAPHIRE_BT :__clear_bit (ABS_MISC , input_dev->absbit); +/* fall through */ case WACOM_MO :case WACOM_G4 :Signature · 1 line
2.20.1
Quoted 24 lines · Ping Cheng
Quoted 22 lines · Jiri Kosina
Quoted 6 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/hid/wacom_wac.c: In function‘wacom_setup_pen_input_capabilities’:
Quoted 1 line
drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through[-Wimplicit-fallthrough=]
Quoted 11 lines
__clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/wacom_wac.c:3508:2: note: here
caseWACOM_MO:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Gustavo A. R. Silva <[email protected]>Let's CC Jason and Ping to make sure it's really intended :)
Yes, it was intended. You can have my Acked-by: Ping Cheng < [email protected]>
Great.
Thanks, Ping.
--
Gustavo
Quoted 32 lines
Cheers,
PingQuoted 27 lines
drivers/hid/wacom_wac.c int wacom_setup_pen_input_capabilities(struct
Quoted 10 lines
--- drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+)drivers/hid/wacom_wac.c +0
-0@@ -3504,6 +3504,7 @@ int wacom_setup_pen_input_capabilities(struct
input_dev*input_dev,Quoted 10 lines
drivers/hid/wacom_wac.c +1
-1switch (features->type) {case GRAPHIRE_BT :__clear_bit (ABS_MISC , input_dev->absbit); +/* fall through */ case WACOM_MO :case WACOM_G4 : --2.20.1
--
Jiri Kosina
SUSE Labs
Quoted 2 lines · Ping Cheng
Yes, it was intended. You can have my Acked-by: Ping Cheng < [email protected]>
Applied, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs