• Qian Cai's avatar
    net/core: tidy up an error message · bf29e9e9
    Qian Cai authored
    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: default avatarQian Cai <cai@gmx.us>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bf29e9e9
dev.c 242 KB