[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v3 56/78] hw/input: add fallthrough pseudo-keyword
From: |
Emmanouil Pitsidianakis |
Subject: |
[RFC PATCH v3 56/78] hw/input: add fallthrough pseudo-keyword |
Date: |
Fri, 13 Oct 2023 11:46:24 +0300 |
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
hw/input/hid.c | 3 ++-
hw/input/tsc2005.c | 4 ++--
hw/input/tsc210x.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/input/hid.c b/hw/input/hid.c
index a9c7dd1ce1..15fffc5dfb 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -283,6 +283,7 @@ static void hid_keyboard_process_keycode(HIDState *hs)
return;
}
/* fall through to process Ctrl_L */
+ fallthrough;
case 0xe1 ... 0xe7:
/* Ctrl_L/Ctrl_R, Shift_L/Shift_R, Alt_L/Alt_R, Win_L/Win_R.
* Handle releases here, or fall through to process presses.
@@ -291,7 +292,7 @@ static void hid_keyboard_process_keycode(HIDState *hs)
hs->kbd.modifiers &= ~(1 << (hid_code & 0x0f));
return;
}
- /* fall through */
+ fallthrough;
case 0xe8 ... 0xe9:
/* USB modifiers are just 1 byte long. Bits 8 and 9 of
* hs->kbd.modifiers implement a state machine that detects the
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c
index db2b80e35f..4f3f1d9d12 100644
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -262,7 +262,7 @@ static void tsc2005_pin_update(TSC2005State *s)
s->enabled = false;
if (!s->pressure)
return;
- /* Fall through */
+ fallthrough;
case TSC_MODE_AUX_SCAN:
break;
@@ -271,7 +271,7 @@ static void tsc2005_pin_update(TSC2005State *s)
case TSC_MODE_Z:
if (!s->pressure)
return;
- /* Fall through */
+ fallthrough;
case TSC_MODE_AUX:
case TSC_MODE_TEMP1:
case TSC_MODE_TEMP2:
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index 950506fb38..9ae426e1a6 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -809,7 +809,7 @@ static void tsc210x_pin_update(TSC210xState *s)
case TSC_MODE_Z:
if (!s->pressure)
return;
- /* Fall through */
+ fallthrough;
case TSC_MODE_BAT1:
case TSC_MODE_BAT2:
case TSC_MODE_AUX:
--
2.39.2
- [RFC PATCH v3 41/78] linux-user: add fallthrough pseudo-keyword, (continued)
- [RFC PATCH v3 41/78] linux-user: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 43/78] hw/misc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 48/78] contrib/vhost-user-scsi: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 50/78] hw/audio: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 49/78] hw/arm: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 54/78] hw/core: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 47/78] contrib/rdmacm-mux: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 52/78] hw/char: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 38/78] system/rtc.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 51/78] chardev: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 56/78] hw/input: add fallthrough pseudo-keyword,
Emmanouil Pitsidianakis <=
- [RFC PATCH v3 42/78] hw/i386: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 46/78] disas: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 53/78] nbd: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 55/78] hw/display: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 57/78] hw/net: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 58/78] hw/ppc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 63/78] hw/ipmi: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13