linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: RE: [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead of open coded variants
Date: Fri, 6 Nov 2020 15:33:36 +0000	[thread overview]
Message-ID: <e461a47754974c0d8d0b61981b77ae80@AcuMS.aculab.com> (raw)
In-Reply-To: <20201106143551.43908-1-andriy.shevchenko@linux.intel.com>

From: Andy Shevchenko
> Sent: 06 November 2020 14:36
> 
> There are few places when GENMASK() or BIT() macro is suitable and makes code
> easier to understand.
> 
...
> -	if ((d & ~0xff) == BRL_UC_ROW) {
> -		if ((ch & ~0xff) == BRL_UC_ROW)
> +	if ((d & ~GENMASK(7, 0)) == BRL_UC_ROW) {
> +		if ((ch & ~GENMASK(7, 0)) == BRL_UC_ROW)
>  			return d | ch;

Do you really think that makes it more readable?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2020-11-06 15:33 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 ` [PATCH v1 3/3] vt: keyboard, make use of assign_bit() API Andy Shevchenko
2020-11-09  9:58   ` Jiri Slaby
2020-11-06 15:33 ` David Laight [this message]
2020-11-06 16:06   ` [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead of open coded variants 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=e461a47754974c0d8d0b61981b77ae80@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=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 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).