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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 19 Jun 2017 10:49:26 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     David.Laight@...LAB.COM
Cc:     antoine.tenart@...e-electrons.com, jason@...edaemon.net,
        andrew@...n.ch, gregory.clement@...e-electrons.com,
        sebastian.hesselbarth@...il.com, f.fainelli@...il.com,
        thomas.petazzoni@...e-electrons.com, nadavh@...vell.com,
        mw@...ihalf.com, linux@...linux.org.uk, netdev@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 03/11] net: mvmdio: use GENMASK for masks

From: David Laight <David.Laight@...LAB.COM>
Date: Mon, 19 Jun 2017 11:57:51 +0000

> From: Antoine Tenart
>> Sent: 14 June 2017 16:49
>> Cosmetic patch to use the GENMASK helper for masks.
> ...
>> -	ret = val & 0xFFFF;
>> +	ret = val & GENMASK(15, 0);
> 
> My 2c: It isn't at all clear to me that changes like this in anyway
> improve the code readability.
> In some sense the '15' should be a named constant - but that just makes
> it even less obvious what is going on.

I agree, a hexidecimal mask of 0xffff is 100 times more readable and
understandable to me than "SOME_MACRO(x, y)".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ