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]
Date:   Thu, 20 Apr 2023 20:03:54 +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 1/9] net: enetc: fix MAC Merge layer
 remaining enabled until a link down event

On Thu, Apr 20, 2023 at 04:22:04PM +0200, Simon Horman wrote:
> > -	/* If link is up, enable MAC Merge right away */
> > -	if (!!(priv->active_offloads & ENETC_F_QBU) &&
> > -	    !(val & ENETC_MMCSR_LINK_FAIL))
> > -		val |= ENETC_MMCSR_ME;
> > +	/* If link is up, enable/disable MAC Merge right away */
> > +	if (!(val & ENETC_MMCSR_LINK_FAIL)) {
> > +		if (!!(priv->active_offloads & ENETC_F_QBU))
> 
> nit: The !!() seems unnecessary,
>      I wonder if it can be written in a simpler way as:
> 
> 		if (priv->active_offloads & ENETC_F_QBU)

I agree. Normally I omit the double negation in simple statements like this.
Here I didn't, because the expression was split into 2 "if" conditions,
and I kept the individual terms as-is for some reason.

Since the generated object code is absolutely the same either way, I would not
resend just for minor style comments such as this one, if you don't mind.
However, I do appreciate the review and I'll pay more attention to this
detail in the future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ