All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8192u: Remove brake statement
@ 2015-02-19 22:13 Ksenija Stanojevic
  2015-02-20 11:28 ` [Outreachy kernel] " Jes Sorensen
  2015-02-26 21:21 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Ksenija Stanojevic @ 2015-02-19 22:13 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Ksenija Stanojevic

This patch fixes the checkpatch.pl warning:
WARNING: "break is not useful after a goto or return"

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index dbd3321..d006602 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1344,7 +1344,6 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 	default:
 		RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip);
 		return true;
-		break;
 	}
 
 
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Remove brake statement
  2015-02-19 22:13 [PATCH] Staging: rtl8192u: Remove brake statement Ksenija Stanojevic
@ 2015-02-20 11:28 ` Jes Sorensen
  2015-02-26 21:21 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2015-02-20 11:28 UTC (permalink / raw)
  To: Ksenija Stanojevic, outreachy-kernel

On 02/19/15 17:13, Ksenija Stanojevic wrote:
> This patch fixes the checkpatch.pl warning:
> WARNING: "break is not useful after a goto or return"
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
>  drivers/staging/rtl8192u/r819xU_phy.c | 1 -
>  1 file changed, 1 deletion(-)

Patch looks good - your patch description works, so this is in the minor
section.

However, in general I recommend writing a message rather than relying on
automated output from checkpatch. You can note in the message that the
issue was found by checkpatch if you like. Something like this:

"Remove meaningless break after return in switch statement. This was
found by checkpatch.pl."

Cheers,
Jes


> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
> index dbd3321..d006602 100644
> --- a/drivers/staging/rtl8192u/r819xU_phy.c
> +++ b/drivers/staging/rtl8192u/r819xU_phy.c
> @@ -1344,7 +1344,6 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
>  	default:
>  		RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip);
>  		return true;
> -		break;
>  	}
>  
>  
> 



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

* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Remove brake statement
  2015-02-19 22:13 [PATCH] Staging: rtl8192u: Remove brake statement Ksenija Stanojevic
  2015-02-20 11:28 ` [Outreachy kernel] " Jes Sorensen
@ 2015-02-26 21:21 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-02-26 21:21 UTC (permalink / raw)
  To: Ksenija Stanojevic; +Cc: outreachy-kernel

On Thu, Feb 19, 2015 at 11:13:39PM +0100, Ksenija Stanojevic wrote:
> This patch fixes the checkpatch.pl warning:
> WARNING: "break is not useful after a goto or return"

You mispelled "break" in your subject line :(



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

end of thread, other threads:[~2015-02-26 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 22:13 [PATCH] Staging: rtl8192u: Remove brake statement Ksenija Stanojevic
2015-02-20 11:28 ` [Outreachy kernel] " Jes Sorensen
2015-02-26 21:21 ` Greg KH

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.