lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e461a47754974c0d8d0b61981b77ae80@AcuMS.aculab.com>
Date:   Fri, 6 Nov 2020 15:33:36 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Andy Shevchenko' <andriy.shevchenko@...ux.intel.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: RE: [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead
 of open coded variants

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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ