All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
@ 2017-07-04 15:09 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-07-04 15:09 UTC (permalink / raw)
  To: Nicolas Ferre, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

When macro MACB_EXT_DESC is defined we end up with two identical
return statements and just one is sufficient. Remove the extra
return.

Detected by CoverityScan, CID#1449361 ("Structurally dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 41e5711544fc..e69ebdd65658 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -146,7 +146,6 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
 	default:
 		break;
 	}
-	return desc_idx;
 #endif
 	return desc_idx;
 }
-- 
2.11.0

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

* [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
@ 2017-07-04 15:09 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-07-04 15:09 UTC (permalink / raw)
  To: Nicolas Ferre, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

When macro MACB_EXT_DESC is defined we end up with two identical
return statements and just one is sufficient. Remove the extra
return.

Detected by CoverityScan, CID#1449361 ("Structurally dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 41e5711544fc..e69ebdd65658 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -146,7 +146,6 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
 	default:
 		break;
 	}
-	return desc_idx;
 #endif
 	return desc_idx;
 }
-- 
2.11.0


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

* Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
  2017-07-04 15:09 ` Colin King
@ 2017-07-05  8:03   ` Nicolas Ferre
  -1 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2017-07-05  8:03 UTC (permalink / raw)
  To: Colin King, netdev, David Miller; +Cc: kernel-janitors, linux-kernel

On 04/07/2017 at 17:09, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> When macro MACB_EXT_DESC is defined we end up with two identical
> return statements and just one is sufficient. Remove the extra
> return.
> 
> Detected by CoverityScan, CID#1449361 ("Structurally dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>  drivers/net/ethernet/cadence/macb_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 41e5711544fc..e69ebdd65658 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -146,7 +146,6 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
>  	default:
>  		break;
>  	}
> -	return desc_idx;
>  #endif
>  	return desc_idx;
>  }
> 


-- 
Nicolas Ferre

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

* Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
@ 2017-07-05  8:03   ` Nicolas Ferre
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2017-07-05  8:03 UTC (permalink / raw)
  To: Colin King, netdev, David Miller; +Cc: kernel-janitors, linux-kernel

On 04/07/2017 at 17:09, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> When macro MACB_EXT_DESC is defined we end up with two identical
> return statements and just one is sufficient. Remove the extra
> return.
> 
> Detected by CoverityScan, CID#1449361 ("Structurally dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>  drivers/net/ethernet/cadence/macb_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 41e5711544fc..e69ebdd65658 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -146,7 +146,6 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
>  	default:
>  		break;
>  	}
> -	return desc_idx;
>  #endif
>  	return desc_idx;
>  }
> 


-- 
Nicolas Ferre

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

* Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
  2017-07-04 15:09 ` Colin King
@ 2017-07-05  8:09   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-07-05  8:09 UTC (permalink / raw)
  To: colin.king; +Cc: nicolas.ferre, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Tue,  4 Jul 2017 16:09:59 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> When macro MACB_EXT_DESC is defined we end up with two identical
> return statements and just one is sufficient. Remove the extra
> return.
> 
> Detected by CoverityScan, CID#1449361 ("Structurally dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks.

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

* Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined
@ 2017-07-05  8:09   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-07-05  8:09 UTC (permalink / raw)
  To: colin.king; +Cc: nicolas.ferre, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Tue,  4 Jul 2017 16:09:59 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> When macro MACB_EXT_DESC is defined we end up with two identical
> return statements and just one is sufficient. Remove the extra
> return.
> 
> Detected by CoverityScan, CID#1449361 ("Structurally dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks.

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

end of thread, other threads:[~2017-07-05  8:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 15:09 [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined Colin King
2017-07-04 15:09 ` Colin King
2017-07-05  8:03 ` Nicolas Ferre
2017-07-05  8:03   ` Nicolas Ferre
2017-07-05  8:09 ` David Miller
2017-07-05  8:09   ` David Miller

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.