aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorQian Cai <cai@gmx.us>2018-12-01 21:11:19 -0500
committerDavid S. Miller <davem@davemloft.net>2018-12-03 16:14:51 -0800
commitbf29e9e9b6d2f09cdbf39b48d028f0b49e944f85 (patch)
tree23ae1651e3830d2ee772abd44f2c56e46ecdb341 /net/core/dev.c
parentmv88e6060: disable hardware level MAC learning (diff)
downloadlinux-dev-bf29e9e9b6d2f09cdbf39b48d028f0b49e944f85.tar.xz
linux-dev-bf29e9e9b6d2f09cdbf39b48d028f0b49e944f85.zip
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3470e7fff1f4..e06223b65674 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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;