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] [day] [month] [year] [list]
Message-ID: <BN8PR12MB32666747FFF4AFD047F19EA5D3510@BN8PR12MB3266.namprd12.prod.outlook.com>
Date:   Mon, 16 Dec 2019 09:22:13 +0000
From:   Jose Abreu <Jose.Abreu@...opsys.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Xu Wang <vulab@...as.ac.cn>
CC:     "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
        "alexandre.torgue@...com" <alexandre.torgue@...com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] stmmac: platform: Remove unnecessary conditions

From: Jakub Kicinski <jakub.kicinski@...ronome.com>
Date: Dec/14/2019, 20:10:49 (UTC+00:00)

> On Wed, 11 Dec 2019 10:31:24 +0000, Xu Wang wrote:
> > Remove conditions where if and else branch are identical.
> > This issue is detected by coccinelle.
> > 
> > Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> > ---
> >  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > index bedaff0..1d26691 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > @@ -229,8 +229,6 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
> >  		plat->tx_sched_algorithm = MTL_TX_ALGORITHM_WFQ;
> >  	else if (of_property_read_bool(tx_node, "snps,tx-sched-dwrr"))
> >  		plat->tx_sched_algorithm = MTL_TX_ALGORITHM_DWRR;
> > -	else if (of_property_read_bool(tx_node, "snps,tx-sched-sp"))
> > -		plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP;
> >  	else
> >  		plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP;
> >  
> 
> Thanks for the patch but in this case it looks like this code is
> intentionally written this way to enumerate all options. Maintainers -
> please speak up if you prefer to have the patch applied, otherwise 
> I'm dropping it.

I rather prefer having all options clearly enumerated so I agree with 
Jakub on this.

---
Thanks,
Jose Miguel Abreu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ