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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230420165852.op2bn3c7kdkhekvx@skbuf>
Date:   Thu, 20 Apr 2023 19:58:52 +0300
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Michal Kubecek <mkubecek@...e.cz>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>,
        Petr Machata <petrm@...dia.com>,
        Danielle Ratson <danieller@...dia.com>,
        Pranavi Somisetty <pranavi.somisetty@....com>,
        Harini Katakam <harini.katakam@....com>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Gerhard Engleder <gerhard@...leder-embedded.com>,
        Ferenc Fejes <ferenc.fejes@...csson.com>,
        Aaron Conole <aconole@...hat.com>,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net-next 4/9] net: enetc: include MAC Merge / FP
 registers in register dump

On Thu, Apr 20, 2023 at 04:38:00PM +0200, Simon Horman wrote:
> > +	if (hw->port && !!(priv->si->hw_features & ENETC_SI_F_QBU))
> 
> nit: I think you could make the condition.
> 
> 	if (hw->port && priv->si->hw_features & ENETC_SI_F_QBU)
> 
> which would be consistent with the condition in the next hunk.
> 
> > +	if (priv->si->hw_features & ENETC_SI_F_QBU) {

Maybe, but it generates the exact same object code (tested with
"make drivers/net/ethernet/freescale/enetc/enetc_ethtool.lst").

When I'm debugging, I'm a bit of a conspiracy theorist when it comes
to operator precedence (& vs &&), and so, "A && B & C" doesn't read
particularly well to me, and would be one of my first suspects at
hiding a bug. I do know it would have worked in this case though,
and that modern gcc/clang usually complains about suspicious/
unintuitive precedence.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ