[PATCH] input: evdev: fixed case statements
From: Paul Lemmermann
Date: Fri Apr 01 2022 - 17:59:26 EST
Fixed case statements which have more than one operation on a single
line. Found using checkpatch.pl.
Signed-off-by: Paul Lemmermann <thepaulodoom@xxxxxxxxxxxxxxxx>
---
drivers/input/evdev.c | 48 ++++++++++++++++++++++++++++++++++---------
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 95f90699d..85c92b30d 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -784,16 +784,44 @@ static int handle_eviocgbit(struct input_dev *dev,
switch (type) {
- case 0: bits = dev->evbit; len = EV_MAX; break;
- case EV_KEY: bits = dev->keybit; len = KEY_MAX; break;
- case EV_REL: bits = dev->relbit; len = REL_MAX; break;
- case EV_ABS: bits = dev->absbit; len = ABS_MAX; break;
- case EV_MSC: bits = dev->mscbit; len = MSC_MAX; break;
- case EV_LED: bits = dev->ledbit; len = LED_MAX; break;
- case EV_SND: bits = dev->sndbit; len = SND_MAX; break;
- case EV_FF: bits = dev->ffbit; len = FF_MAX; break;
- case EV_SW: bits = dev->swbit; len = SW_MAX; break;
- default: return -EINVAL;
+ case 0:
+ bits = dev->evbit;
+ len = EV_MAX;
+ break;
+ case EV_KEY:
+ bits = dev->keybit;
+ len = KEY_MAX;
+ break;
+ case EV_REL:
+ bits = dev->relbit;
+ len = REL_MAX;
+ break;
+ case EV_ABS:
+ bits = dev->absbit;
+ len = ABS_MAX;
+ break;
+ case EV_MSC:
+ bits = dev->mscbit;
+ len = MSC_MAX;
+ break;
+ case EV_LED:
+ bits = dev->ledbit;
+ len = LED_MAX;
+ break;
+ case EV_SND:
+ bits = dev->sndbit;
+ len = SND_MAX;
+ break;
+ case EV_FF:
+ bits = dev->ffbit;
+ len = FF_MAX;
+ break;
+ case EV_SW:
+ bits = dev->swbit;
+ len = SW_MAX;
+ break;
+ default:
+ return -EINVAL;
}
return bits_to_user(bits, len, size, p, compat_mode);
--
2.35.1