Re: [PATCH] net/core: tidy up an error message

2018-12-01 Thread Stephen Hemminger
On Fri, 30 Nov 2018 23:51:53 -0500 Qian Cai wrote: > + weight, > + !strchr(dev->name, '%') ? dev->name : "unknown" Agree with Joe, use netdev_err_once or use netdev_name().

Re: [PATCH] net/core: tidy up an error message

2018-12-01 Thread Joe Perches
On Fri, 2018-11-30 at 23:51 -0500, Qian Cai wrote: > netif_napi_add() could report an error like this below due to it allows > to pass a format string for wildcarding before calling > dev_get_valid_name(), > > "netif_napi_add() called with weight 256 on device eth%d" > > For example, hns_enet_drv

[PATCH] net/core: tidy up an error message

2018-11-30 Thread Qian Cai
netif_napi_add() could report an error like this below due to it allows to pass a format string for wildcarding before calling dev_get_valid_name(), "netif_napi_add() called with weight 256 on device eth%d" For example, hns_enet_drv module does this. hns_nic_try_get_ae hns_nic_init_ring_data