Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sh_eth: remove open coded netif_running()

It had a purpose back in the days, but today we have a handy helper.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230321065826.2044-1-wsa+renesas@sang-engineering.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Wolfram Sang and committed by
Paolo Abeni
ce1fdb06 7849c42d

+1 -6
+1 -5
drivers/net/ethernet/renesas/sh_eth.c
··· 2441 2441 2442 2442 netif_start_queue(ndev); 2443 2443 2444 - mdp->is_opened = 1; 2445 - 2446 2444 return ret; 2447 2445 2448 2446 out_free_irq: ··· 2563 2565 if (mdp->cd->no_tx_cntrs) 2564 2566 return &ndev->stats; 2565 2567 2566 - if (!mdp->is_opened) 2568 + if (!netif_running(ndev)) 2567 2569 return &ndev->stats; 2568 2570 2569 2571 sh_eth_update_stat(ndev, &ndev->stats.tx_dropped, TROCR); ··· 2611 2613 2612 2614 /* Free all the skbuffs in the Rx queue and the DMA buffer. */ 2613 2615 sh_eth_ring_free(ndev); 2614 - 2615 - mdp->is_opened = 0; 2616 2616 2617 2617 pm_runtime_put(&mdp->pdev->dev); 2618 2618
-1
drivers/net/ethernet/renesas/sh_eth.h
··· 560 560 561 561 unsigned no_ether_link:1; 562 562 unsigned ether_link_active_low:1; 563 - unsigned is_opened:1; 564 563 unsigned wol_enabled:1; 565 564 }; 566 565