[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220401215842.58135-1-thepaulodoom@thepaulodoom.com>
Date: Fri, 1 Apr 2022 16:58:42 -0500
From: Paul Lemmermann <thepaulodoom@...paulodoom.com>
To: dmitry.torokhov@...il.com
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
Paul Lemmermann <thepaulodoom@...paulodoom.com>
Subject: [PATCH] input: evdev: fixed case statements
Fixed case statements which have more than one operation on a single
line. Found using checkpatch.pl.
Signed-off-by: Paul Lemmermann <thepaulodoom@...paulodoom.com>
---
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
Powered by blists - more mailing lists