nfp: don't use netdev_warn() before netdev is registered
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 22 Mar 2017 00:59:17 +0000 (17:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 19:59:08 +0000 (12:59 -0700)
Fix warning which was using netdev_warn() instead of dev_warn()
to early.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index f134f1808b9a1ace7b3bcd75f40b8e6f30f31815..19f9d95faea4be6a0d3a4c42bec1a0f8605275d8 100644 (file)
@@ -336,9 +336,9 @@ nfp_net_irqs_assign(struct nfp_net *nn, struct msix_entry *irq_entries,
 
        if (dp->num_rx_rings > dp->num_r_vecs ||
            dp->num_tx_rings > dp->num_r_vecs)
-               nn_warn(nn, "More rings (%d,%d) than vectors (%d).\n",
-                       dp->num_rx_rings, dp->num_tx_rings,
-                       dp->num_r_vecs);
+               dev_warn(nn->dp.dev, "More rings (%d,%d) than vectors (%d).\n",
+                        dp->num_rx_rings, dp->num_tx_rings,
+                        dp->num_r_vecs);
 
        dp->num_rx_rings = min(dp->num_r_vecs, dp->num_rx_rings);
        dp->num_tx_rings = min(dp->num_r_vecs, dp->num_tx_rings);