Message ID | f09d7c64-4a2b-6973-09a4-10d759ed0df4@omp.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | 9a90986efcffc7e996f63837b0e84d5e773f2763 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] sh_eth: kill useless initializers in sh_eth_{suspend|resume}() | expand |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Sat, 29 Jan 2022 21:45:45 +0300 you wrote: > sh_eth_{suspend|resume}() initialize their local variable 'ret' to 0 but > this value is never really used, thus we can kill those intializers... > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> > > --- > This patch is against DaveM's 'net-next.git' repo. > > [...] Here is the summary with links: - [net-next] sh_eth: kill useless initializers in sh_eth_{suspend|resume}() https://git.kernel.org/netdev/net-next/c/9a90986efcff You are awesome, thank you!
On Tue, Feb 1, 2022 at 9:24 AM Sergey Shtylyov <s.shtylyov@omp.ru> wrote: > sh_eth_{suspend|resume}() initialize their local variable 'ret' to 0 but > this value is never really used, thus we can kill those intializers... > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -3464,7 +3464,7 @@ static int sh_eth_suspend(struct device { struct net_device *ndev = dev_get_drvdata(dev); struct sh_eth_private *mdp = netdev_priv(ndev); - int ret = 0; + int ret; if (!netif_running(ndev)) return 0; @@ -3483,7 +3483,7 @@ static int sh_eth_resume(struct device * { struct net_device *ndev = dev_get_drvdata(dev); struct sh_eth_private *mdp = netdev_priv(ndev); - int ret = 0; + int ret; if (!netif_running(ndev)) return 0;
sh_eth_{suspend|resume}() initialize their local variable 'ret' to 0 but this value is never really used, thus we can kill those intializers... Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- This patch is against DaveM's 'net-next.git' repo. drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)