From: Paul Lemmermann <thepaulodoom@thepaulodoom.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Lemmermann <thepaulodoom@thepaulodoom.com>
Subject: [PATCH] input: evdev: fixed case statements
Date: Fri, 1 Apr 2022 16:58:42 -0500 [thread overview]
Message-ID: <20220401215842.58135-1-thepaulodoom@thepaulodoom.com> (raw)
Fixed case statements which have more than one operation on a single
line. Found using checkpatch.pl.
Signed-off-by: Paul Lemmermann <thepaulodoom@thepaulodoom.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
next reply other threads:[~2022-04-01 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 21:58 Paul Lemmermann [this message]
2022-05-12 21:30 ` [PATCH] input: evdev: fixed case statements Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220401215842.58135-1-thepaulodoom@thepaulodoom.com \
--to=thepaulodoom@thepaulodoom.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).