Skip to contentSkip to conversation

HID: roccat: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jul 2, 2018 – Jul 17, 2018

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

PATCH 1/1 HID: roccat: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

---
 drivers/hid/hid-roccat-kone.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/hid-roccat-kone.c +1 -0
index bf4675a..c4dd616 100644
@@ -783,6 +783,7 @@ static void kone_keep_values_up_to_date(struct kone_device *kone,
 	case kone_mouse_event_switch_profile:
 		kone->actual_dpi = kone->profiles[event->value - 1].
 				startup_dpi;
+		/* fall through */
 	case kone_mouse_event_osd_profile:
 		kone->actual_profile = event->value;
 		break;
Signature · 1 line
2.7.4
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.

---
 drivers/hid/hid-roccat-kone.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/hid-roccat-kone.c +0 -0
index bf4675a..c4dd616 100644

drivers/hid/hid-roccat-kone.c static void kone_keep_values_up_to_date(struct kone_device *kone, · line 789

Quoted 7 lines
drivers/hid/hid-roccat-kone.c +1 -0
@@ -783,6 +783,7 @@ static void kone_keep_values_up_to_date(struct kone_device *kone,
 	case kone_mouse_event_switch_profile:
 		kone->actual_dpi = kone->profiles[event->value - 1].
 				startup_dpi;
+		/* fall through */
 	case kone_mouse_event_osd_profile:
 		kone->actual_profile = event->value;
 		break;

I *think* the fall-through is correct thing to do here, but I'd like to get explicit Ack from Stefan. Stefan, please?

Signature · 2 lines
Jiri Kosina
SUSE Labs