linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm63xx_enet: remove needless variable definitions
@ 2021-07-28 13:24 Tang Bin
  2021-07-28 16:14 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2021-07-28 13:24 UTC (permalink / raw)
  To: davem, kuba, f.fainelli, bcm-kernel-feedback-list
  Cc: netdev, linux-arm-kernel, linux-kernel, Tang Bin, Zhang Shengju

In the function bcm_enetsw_probe(), 'ret' will be assigned by
bcm_enet_change_mtu(), so 'ret = 0' make no sense.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 916824cca..509e10013 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2646,7 +2646,6 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
 	if (!res_mem || irq_rx < 0)
 		return -ENODEV;
 
-	ret = 0;
 	dev = alloc_etherdev(sizeof(*priv));
 	if (!dev)
 		return -ENOMEM;
-- 
2.20.1.windows.1




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] bcm63xx_enet: remove needless variable definitions
  2021-07-28 13:24 [PATCH] bcm63xx_enet: remove needless variable definitions Tang Bin
@ 2021-07-28 16:14 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2021-07-28 16:14 UTC (permalink / raw)
  To: Tang Bin, davem, kuba, bcm-kernel-feedback-list
  Cc: netdev, linux-arm-kernel, linux-kernel, Zhang Shengju



On 7/28/2021 6:24 AM, Tang Bin wrote:
> In the function bcm_enetsw_probe(), 'ret' will be assigned by
> bcm_enet_change_mtu(), so 'ret = 0' make no sense.

You are not removing the variable definition or declaration, you are 
removing a redundant assignment which is a different thing. I do agree 
with the rationale however, so please fix up the subject and I will add 
my Acked-by to this patch. Thanks!
> 
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>   drivers/net/ethernet/broadcom/bcm63xx_enet.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> index 916824cca..509e10013 100644
> --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> @@ -2646,7 +2646,6 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
>   	if (!res_mem || irq_rx < 0)
>   		return -ENODEV;
>   
> -	ret = 0;
>   	dev = alloc_etherdev(sizeof(*priv));
>   	if (!dev)
>   		return -ENOMEM;
> 

-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-07-28 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 13:24 [PATCH] bcm63xx_enet: remove needless variable definitions Tang Bin
2021-07-28 16:14 ` Florian Fainelli

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).