HID: roccat: Mark expected switch fall-through
Subsystems (2)
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/hid/hid-roccat-kone.c | 1 + 1 file changed, 1 insertion(+)
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 ;
Signature · 1 line
2.7.4
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/hid/hid-roccat-kone.c | 1 + 1 file changed, 1 insertion(+)drivers/hid/hid-roccat-kone.c +0
-0
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