Message ID | 20210609184155.921662-4-olteanv@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Port the SJA1105 DSA driver to XPCS | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 2 maintainers not CCed: linux-arm-kernel@lists.infradead.org linux-stm32@st-md-mailman.stormreply.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Wed, Jun 09, 2021 at 09:41:45PM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean <vladimir.oltean@nxp.com> > > There is no reason to embed an if within an if, we can just logically > AND the two conditions. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com> > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index 1c881ec8cd04..372673f9af30 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -7002,12 +7002,10 @@ int stmmac_dvr_probe(struct device *device, > if (priv->plat->speed_mode_2500) > priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv); > > - if (priv->plat->mdio_bus_data) { > - if (priv->plat->mdio_bus_data->has_xpcs) { > - ret = stmmac_xpcs_setup(priv->mii); > - if (ret) > - goto error_xpcs_setup; > - } > + if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { > + ret = stmmac_xpcs_setup(priv->mii); > + if (ret) > + goto error_xpcs_setup; > } > > ret = stmmac_phy_setup(priv); > -- > 2.25.1 >
On Wed, Jun 09, 2021 at 09:41:45PM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean <vladimir.oltean@nxp.com> > > There is no reason to embed an if within an if, we can just logically > AND the two conditions. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com> > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index 1c881ec8cd04..372673f9af30 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -7002,12 +7002,10 @@ int stmmac_dvr_probe(struct device *device, > if (priv->plat->speed_mode_2500) > priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv); > > - if (priv->plat->mdio_bus_data) { > - if (priv->plat->mdio_bus_data->has_xpcs) { > - ret = stmmac_xpcs_setup(priv->mii); > - if (ret) > - goto error_xpcs_setup; > - } > + if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { > + ret = stmmac_xpcs_setup(priv->mii); > + if (ret) > + goto error_xpcs_setup; > } > > ret = stmmac_phy_setup(priv); > -- > 2.25.1 >
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1c881ec8cd04..372673f9af30 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7002,12 +7002,10 @@ int stmmac_dvr_probe(struct device *device, if (priv->plat->speed_mode_2500) priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv); - if (priv->plat->mdio_bus_data) { - if (priv->plat->mdio_bus_data->has_xpcs) { - ret = stmmac_xpcs_setup(priv->mii); - if (ret) - goto error_xpcs_setup; - } + if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { + ret = stmmac_xpcs_setup(priv->mii); + if (ret) + goto error_xpcs_setup; } ret = stmmac_phy_setup(priv);