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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 31 Mar 2019 16:59:13 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: improve genphy_read_status

On 31.03.2019 16:52, Andrew Lunn wrote:
>> -	if (AUTONEG_ENABLE == phydev->autoneg) {
>> +	if (phydev->autoneg == AUTONEG_ENABLE && phydev->link) {
> 
> Hi Heiner
> 
> I don't necessary agree with placing the constant first in the
> comparison, but it is best practice not to change it when making
> additions. It makes it a little bit harder to see what the actual
> change was.
> 
I understand the point. However a patch to only change the order
of the operands most likely would also be rejected as not being
worth it. As a consequence we would have to live with it forever.
So I think it needs some "if we touch the code anyway" situation.
Or what would be the preferred way to change something like that
that is in general ok and can be just a little bit improved?

>        Andrew
> 
Heiner

Powered by blists - more mailing lists