aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/gianfar_ethtool.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-13 15:03:18 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-14 15:41:49 -0400
commit375d6a1b428e28412913a0ef8e849d27f7d32a1e (patch)
tree88bea27e5de8f0ebb9c94346cfe8722a53e1cbc7 /drivers/net/ethernet/freescale/gianfar_ethtool.c
parent31b7720c825934bca1c0f9f562b0c2dc25f7ae81 (diff)
gianfar: Use netdev_<level> when possible
Use a more current logging style. Convert pr_<level> to netdev_<level> when a struct net_device is available. Add pr_fmt and neaten other formats too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar_ethtool.c')
-rw-r--r--drivers/net/ethernet/freescale/gianfar_ethtool.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 4e7118f9f075..083603f6bec0 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -389,14 +389,14 @@ static int gfar_scoalesce(struct net_device *dev,
389 389
390 /* Check the bounds of the values */ 390 /* Check the bounds of the values */
391 if (cvals->rx_coalesce_usecs > GFAR_MAX_COAL_USECS) { 391 if (cvals->rx_coalesce_usecs > GFAR_MAX_COAL_USECS) {
392 pr_info("Coalescing is limited to %d microseconds\n", 392 netdev_info(dev, "Coalescing is limited to %d microseconds\n",
393 GFAR_MAX_COAL_USECS); 393 GFAR_MAX_COAL_USECS);
394 return -EINVAL; 394 return -EINVAL;
395 } 395 }
396 396
397 if (cvals->rx_max_coalesced_frames > GFAR_MAX_COAL_FRAMES) { 397 if (cvals->rx_max_coalesced_frames > GFAR_MAX_COAL_FRAMES) {
398 pr_info("Coalescing is limited to %d frames\n", 398 netdev_info(dev, "Coalescing is limited to %d frames\n",
399 GFAR_MAX_COAL_FRAMES); 399 GFAR_MAX_COAL_FRAMES);
400 return -EINVAL; 400 return -EINVAL;
401 } 401 }
402 402
@@ -418,14 +418,14 @@ static int gfar_scoalesce(struct net_device *dev,
418 418
419 /* Check the bounds of the values */ 419 /* Check the bounds of the values */
420 if (cvals->tx_coalesce_usecs > GFAR_MAX_COAL_USECS) { 420 if (cvals->tx_coalesce_usecs > GFAR_MAX_COAL_USECS) {
421 pr_info("Coalescing is limited to %d microseconds\n", 421 netdev_info(dev, "Coalescing is limited to %d microseconds\n",
422 GFAR_MAX_COAL_USECS); 422 GFAR_MAX_COAL_USECS);
423 return -EINVAL; 423 return -EINVAL;
424 } 424 }
425 425
426 if (cvals->tx_max_coalesced_frames > GFAR_MAX_COAL_FRAMES) { 426 if (cvals->tx_max_coalesced_frames > GFAR_MAX_COAL_FRAMES) {
427 pr_info("Coalescing is limited to %d frames\n", 427 netdev_info(dev, "Coalescing is limited to %d frames\n",
428 GFAR_MAX_COAL_FRAMES); 428 GFAR_MAX_COAL_FRAMES);
429 return -EINVAL; 429 return -EINVAL;
430 } 430 }
431 431
@@ -735,7 +735,8 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
735 cmp_rqfpr = RQFPR_IPV6 |RQFPR_UDP; 735 cmp_rqfpr = RQFPR_IPV6 |RQFPR_UDP;
736 break; 736 break;
737 default: 737 default:
738 pr_err("Right now this class is not supported\n"); 738 netdev_err(priv->ndev,
739 "Right now this class is not supported\n");
739 ret = 0; 740 ret = 0;
740 goto err; 741 goto err;
741 } 742 }
@@ -751,7 +752,8 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
751 } 752 }
752 753
753 if (i == MAX_FILER_IDX + 1) { 754 if (i == MAX_FILER_IDX + 1) {
754 pr_err("No parse rule found, can't create hash rules\n"); 755 netdev_err(priv->ndev,
756 "No parse rule found, can't create hash rules\n");
755 ret = 0; 757 ret = 0;
756 goto err; 758 goto err;
757 } 759 }
@@ -1568,7 +1570,7 @@ static int gfar_process_filer_changes(struct gfar_private *priv)
1568 gfar_cluster_filer(tab); 1570 gfar_cluster_filer(tab);
1569 gfar_optimize_filer_masks(tab); 1571 gfar_optimize_filer_masks(tab);
1570 1572
1571 pr_debug("\n\tSummary:\n" 1573 pr_debug("\tSummary:\n"
1572 "\tData on hardware: %d\n" 1574 "\tData on hardware: %d\n"
1573 "\tCompression rate: %d%%\n", 1575 "\tCompression rate: %d%%\n",
1574 tab->index, 100 - (100 * tab->index) / i); 1576 tab->index, 100 - (100 * tab->index) / i);