lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH v2] net: dsa: mt7530: Add some return-value checks
From
Date
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
\
 
 \ /
  Last update: 2020-09-24 14:15    [W:0.065 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site