From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 3/3] vt: keyboard, make use of assign_bit() API
Date: Fri, 6 Nov 2020 16:35:51 +0200 [thread overview]
Message-ID: <20201106143551.43908-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20201106143551.43908-1-andriy.shevchenko@linux.intel.com>
We have for some time the assign_bit() API to replace open coded
if (foo)
set_bit(n, bar);
else
clear_bit(n, bar);
Use this API in VT keyboard library code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/tty/vt/keyboard.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 647c343f61fb..b5132191b0ad 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1433,10 +1433,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
raw_mode = true;
}
- if (down)
- set_bit(keycode, key_down);
- else
- clear_bit(keycode, key_down);
+ assign_bit(keycode, key_down, down);
if (rep &&
(!vc_kbd_mode(kbd, VC_REPEAT) ||
--
2.28.0
next prev parent reply other threads:[~2020-11-06 14:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 14:35 [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead of open coded variants Andy Shevchenko
2020-11-06 14:35 ` [PATCH v1 2/3] vt: keyboard, replace numbers with \r, \n where appropriate Andy Shevchenko
2020-11-09 9:58 ` Jiri Slaby
2020-11-06 14:35 ` Andy Shevchenko [this message]
2020-11-09 9:58 ` [PATCH v1 3/3] vt: keyboard, make use of assign_bit() API Jiri Slaby
2020-11-06 15:33 ` [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead of open coded variants David Laight
2020-11-06 16:06 ` Andy Shevchenko
2020-11-09 9:57 ` Jiri Slaby
2020-11-09 10:10 ` Andy Shevchenko
2020-11-09 10:20 ` David Laight
2020-11-09 10:44 ` 'Andy Shevchenko'
2020-11-09 10:27 ` Andy Shevchenko
2020-11-09 10:41 ` Jiri Slaby
2020-11-09 10:54 ` Andy Shevchenko
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=20201106143551.43908-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.