linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: octeon: remove braces from single-line block
@ 2021-02-06 20:17 Phillip Potter
  2021-02-08  7:14 ` Alexander Sverdlin
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Potter @ 2021-02-06 20:17 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-kernel, alexander.sverdlin, f.fainelli, andrew,
	davem, chris.packham

This removes the braces from the if statement that checks the
physical node return value in cvm_oct_phy_setup_device, as this
block contains only one statement. Fixes a style warning.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/octeon/ethernet-mdio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 0bf545849b11..b0fd083a5bf2 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -146,9 +146,8 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
 		goto no_phy;
 
 	phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
-	if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
+	if (!phy_node && of_phy_is_fixed_link(priv->of_node))
 		phy_node = of_node_get(priv->of_node);
-	}
 	if (!phy_node)
 		goto no_phy;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: octeon: remove braces from single-line block
  2021-02-06 20:17 [PATCH] staging: octeon: remove braces from single-line block Phillip Potter
@ 2021-02-08  7:14 ` Alexander Sverdlin
  2021-02-08 11:49   ` Phillip Potter
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Sverdlin @ 2021-02-08  7:14 UTC (permalink / raw)
  To: Phillip Potter, gregkh
  Cc: devel, linux-kernel, f.fainelli, andrew, davem, chris.packham

Hi!

On 06/02/2021 21:17, Phillip Potter wrote:
> This removes the braces from the if statement that checks the
> physical node return value in cvm_oct_phy_setup_device, as this
> block contains only one statement. Fixes a style warning.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>

> ---
>  drivers/staging/octeon/ethernet-mdio.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
> index 0bf545849b11..b0fd083a5bf2 100644
> --- a/drivers/staging/octeon/ethernet-mdio.c
> +++ b/drivers/staging/octeon/ethernet-mdio.c
> @@ -146,9 +146,8 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
>  		goto no_phy;
>  
>  	phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
> -	if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
> +	if (!phy_node && of_phy_is_fixed_link(priv->of_node))
>  		phy_node = of_node_get(priv->of_node);
> -	}
>  	if (!phy_node)
>  		goto no_phy;
>  

-- 
Best regards,
Alexander Sverdlin.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: octeon: remove braces from single-line block
  2021-02-08  7:14 ` Alexander Sverdlin
@ 2021-02-08 11:49   ` Phillip Potter
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2021-02-08 11:49 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: devel, linux-kernel, f.fainelli, andrew, davem, chris.packham, gregkh

On Mon, Feb 08, 2021 at 08:14:02AM +0100, Alexander Sverdlin wrote:
> Hi!
> 
> On 06/02/2021 21:17, Phillip Potter wrote:
> > This removes the braces from the if statement that checks the
> > physical node return value in cvm_oct_phy_setup_device, as this
> > block contains only one statement. Fixes a style warning.
> > 
> > Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> 
> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> 

Thank you Alexander.

> > ---
> >  drivers/staging/octeon/ethernet-mdio.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
> > index 0bf545849b11..b0fd083a5bf2 100644
> > --- a/drivers/staging/octeon/ethernet-mdio.c
> > +++ b/drivers/staging/octeon/ethernet-mdio.c
> > @@ -146,9 +146,8 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
> >  		goto no_phy;
> >  
> >  	phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
> > -	if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
> > +	if (!phy_node && of_phy_is_fixed_link(priv->of_node))
> >  		phy_node = of_node_get(priv->of_node);
> > -	}
> >  	if (!phy_node)
> >  		goto no_phy;
> >  
> 
> -- 
> Best regards,
> Alexander Sverdlin.

Regards,
Phil Potter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-08 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06 20:17 [PATCH] staging: octeon: remove braces from single-line block Phillip Potter
2021-02-08  7:14 ` Alexander Sverdlin
2021-02-08 11:49   ` Phillip Potter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).