All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtlwifi: Remove an extra pair of braces
@ 2018-10-21 23:49 Maya Nakamura
  2018-10-22  8:27 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Maya Nakamura @ 2018-10-21 23:49 UTC (permalink / raw)
  To: gregkh, outreachy-kernel

Remove an extra pair of braces. Issue found while reviewing one of
Coccinelle's semantic patch results for returnvar.cocci.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
 drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
index 4bf86e5a451f..90a41c64c0c2 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
@@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
 
 s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
 {
-	{
-		return curr_sig;
-	}
+	return curr_sig;
 }
 
 static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
-- 
2.17.1



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

* Re: [PATCH] staging: rtlwifi: Remove an extra pair of braces
  2018-10-21 23:49 [PATCH] staging: rtlwifi: Remove an extra pair of braces Maya Nakamura
@ 2018-10-22  8:27 ` Greg KH
  2018-10-23  6:57   ` Maya Nakamura
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-10-22  8:27 UTC (permalink / raw)
  To: Maya Nakamura; +Cc: outreachy-kernel

On Sun, Oct 21, 2018 at 04:49:49PM -0700, Maya Nakamura wrote:
> Remove an extra pair of braces. Issue found while reviewing one of
> Coccinelle's semantic patch results for returnvar.cocci.
> 
> Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> ---
>  drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> index 4bf86e5a451f..90a41c64c0c2 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> @@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
>  
>  s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
>  {
> -	{
> -		return curr_sig;
> -	}
> +	return curr_sig;
>  }


Why is this function needed at all?  Can't it just be removed and only
use the curr_sig parameter where it is called?

thanks,

greg k-h


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

* Re: [PATCH] staging: rtlwifi: Remove an extra pair of braces
  2018-10-22  8:27 ` Greg KH
@ 2018-10-23  6:57   ` Maya Nakamura
  0 siblings, 0 replies; 3+ messages in thread
From: Maya Nakamura @ 2018-10-23  6:57 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

On Mon, Oct 22, 2018 at 09:27:32AM +0100, Greg KH wrote:
> On Sun, Oct 21, 2018 at 04:49:49PM -0700, Maya Nakamura wrote:
> > Remove an extra pair of braces. Issue found while reviewing one of
> > Coccinelle's semantic patch results for returnvar.cocci.
> > 
> > Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> > ---
> >  drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > index 4bf86e5a451f..90a41c64c0c2 100644
> > --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > @@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
> >  
> >  s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
> >  {
> > -	{
> > -		return curr_sig;
> > -	}
> > +	return curr_sig;
> >  }
> 
> 
> Why is this function needed at all?  Can't it just be removed and only
> use the curr_sig parameter where it is called?
> 
> thanks,
> 
> greg k-h

Thank you for suggesting further changes to the file! As you pointed
out, I can modify where the specific function is called (five places)
and remove the function's declaration/definition. I will submit a new
patch.

Maya


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

end of thread, other threads:[~2018-10-23  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-21 23:49 [PATCH] staging: rtlwifi: Remove an extra pair of braces Maya Nakamura
2018-10-22  8:27 ` Greg KH
2018-10-23  6:57   ` Maya Nakamura

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.