mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
net/core: tidy up an error message
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 netif_napi_add register_netdev dev_get_valid_name Hence, make it a bit more human-readable by using netdev_err_once() instead. Signed-off-by: Qian Cai <cai@gmx.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a74515604a
commit
bf29e9e9b6
1 changed files with 2 additions and 2 deletions
|
@ -6209,8 +6209,8 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
|
|||
napi->skb = NULL;
|
||||
napi->poll = poll;
|
||||
if (weight > NAPI_POLL_WEIGHT)
|
||||
pr_err_once("netif_napi_add() called with weight %d on device %s\n",
|
||||
weight, dev->name);
|
||||
netdev_err_once(dev, "%s() called with weight %d\n", __func__,
|
||||
weight);
|
||||
napi->weight = weight;
|
||||
list_add(&napi->dev_list, &dev->napi_list);
|
||||
napi->dev = dev;
|
||||
|
|
Loading…
Reference in a new issue