Skip to contentSkip to conversation

HID: wacom: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 5 messages Feb 11, 2019 – Feb 15, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 72477e872324..5ecda99bf431 100644
@@ -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
maintainer
#1 lore raw
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
case WACOM_MO:
^~~~

Quoted 6 lines

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.

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
index 72477e872324..5ecda99bf431 100644
@@ -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
#2 lore raw
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
case WACOM_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.

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
index 72477e872324..5ecda99bf431 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): CAF8JNh+EzcCoOvyTm59p99Cg_3S4adGcnpKs4QkpZStsU=XURA@mail.gmail.com

#4 lore raw
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
case WACOM_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

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,
Ping

Quoted 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
index 72477e872324..5ecda99bf431 100644
@@ -3504,6 +3504,7 @@ int wacom_setup_pen_input_capabilities(struct

input_dev *input_dev,

Quoted 10 lines
drivers/hid/wacom_wac.c +1 -1
      switch (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