Re: [PATCH net v3 1/2] smsc911x: only update stats when interface is up
From: Wolfram Sang
Date: Fri Mar 24 2023 - 03:33:31 EST
Hi Jakub,
> Maybe we should add a false-negative version of netif_running() ?
> __LINK_STATE_START*ED* ?
Sounds very reasonable, yet I am missing subsystem details to really
judge it. I just hacked a quick coccinelle script and 14 more drivers
could be happy about such a change:
drivers/net/ethernet/3com/3c515.c | 2 +-
drivers/net/ethernet/8390/axnet_cs.c | 2 +-
drivers/net/ethernet/8390/lib8390.c | 2 +-
drivers/net/ethernet/dec/tulip/de2104x.c | 2 +-
drivers/net/ethernet/dec/tulip/tulip_core.c | 2 +-
drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +-
drivers/net/ethernet/fealnx.c | 2 +-
drivers/net/ethernet/natsemi/natsemi.c | 2 +-
drivers/net/ethernet/realtek/8139cp.c | 2 +-
drivers/net/ethernet/silan/sc92031.c | 2 +-
drivers/net/ethernet/smsc/epic100.c | 2 +-
drivers/net/ethernet/sun/sungem.c | 2 +-
drivers/net/ethernet/toshiba/tc35815.c | 2 +-
drivers/net/ethernet/via/via-velocity.c | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
The script:
@@
identifier name, args;
@@
static struct net_device_stats *name(struct net_device *args)
{
...
- netif_running
+ netif_opened
...
}
Thanks and happy hacking,
Wolfram
Attachment:
signature.asc
Description: PGP signature