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]
Message-ID: <1600949604.11746.27.camel@mtksdccf07>
Date:   Thu, 24 Sep 2020 20:13:24 +0800
From:   Landen Chao <landen.chao@...iatek.com>
To:     Alex Dewar <alex.dewar90@...il.com>
CC:     Sean Wang <Sean.Wang@...iatek.com>, Andrew Lunn <andrew@...n.ch>,
        "Vivien Didelot" <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] net: dsa: mt7530: Add some return-value checks

Hi Alex,

Thanks for your patch. By linux/scripts/checkpatch.pl

On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote:
[..]
> @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch *ds)
>  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
>  			   PCR_MATRIX_CLR);
>  
> -		if (dsa_is_cpu_port(ds, i))
> -			mt753x_cpu_port_enable(ds, i);
> -		else
> +		if (dsa_is_cpu_port(ds, i)) {
> +			ret = mt753x_cpu_port_enable(ds, i);
> +			if (ret)
> +				return ret;
> +		} else
>  			mt7530_port_disable(ds, i);
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement
>  
>  		/* Enable consistent egress tag */
> @@ -1785,9 +1791,11 @@ mt7531_setup(struct dsa_switch *ds)
>  
>  		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
>  
> -		if (dsa_is_cpu_port(ds, i))
> -			mt753x_cpu_port_enable(ds, i);
> -		else
> +		if (dsa_is_cpu_port(ds, i)) {
> +			ret = mt753x_cpu_port_enable(ds, i);
> +			if (ret)
> +				return ret;
> +		} else
>  			mt7530_port_disable(ds, i);
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement

[..]
regards landen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ