Message ID | 20210728132456.2540-1-tangbin@cmss.chinamobile.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | bcm63xx_enet: remove needless variable definitions | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 2 maintainers not CCed: liew.s.piaw@gmail.com arnd@arndb.de |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
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; >
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;