From f1deab502206ab7e4470334b7738383c76e4ddd9 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 14 Aug 2011 12:16:21 +0000 Subject: bnx2x: Use pr_fmt and message logging cleanups Add pr_fmt(fmt) KBUILD_MODNAME ": " to prefix messages with "bnx2x: ". Remove #define DP_LEVEL and use pr_notice. Repeating KERN_ isn't necessary in multi-line printks. printk macro neatening, use fmt and ##__VA_ARGS__. Coalesce long formats. Signed-off-by: Joe Perches Acked-by: Eilon Greenstein Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c') diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index 771f680..628f7b9 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c @@ -14,6 +14,9 @@ * Statistics and Link management by Yitchak Gertner * */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include "bnx2x_stats.h" #include "bnx2x_cmn.h" @@ -1194,14 +1197,13 @@ static void bnx2x_stats_update(struct bnx2x *bp) struct bnx2x_fastpath *fp = &bp->fp[i]; struct bnx2x_eth_q_stats *qstats = &fp->eth_q_stats; - printk(KERN_DEBUG "%s: rx usage(%4u) *rx_cons_sb(%u)" - " rx pkt(%lu) rx calls(%lu %lu)\n", - fp->name, (le16_to_cpu(*fp->rx_cons_sb) - - fp->rx_comp_cons), - le16_to_cpu(*fp->rx_cons_sb), - bnx2x_hilo(&qstats-> - total_unicast_packets_received_hi), - fp->rx_calls, fp->rx_pkt); + pr_debug("%s: rx usage(%4u) *rx_cons_sb(%u) rx pkt(%lu) rx calls(%lu %lu)\n", + fp->name, (le16_to_cpu(*fp->rx_cons_sb) - + fp->rx_comp_cons), + le16_to_cpu(*fp->rx_cons_sb), + bnx2x_hilo(&qstats-> + total_unicast_packets_received_hi), + fp->rx_calls, fp->rx_pkt); } for_each_eth_queue(bp, i) { @@ -1210,27 +1212,25 @@ static void bnx2x_stats_update(struct bnx2x *bp) struct bnx2x_eth_q_stats *qstats = &fp->eth_q_stats; struct netdev_queue *txq; - printk(KERN_DEBUG "%s: tx pkt(%lu) (Xoff events %u)", - fp->name, bnx2x_hilo( - &qstats->total_unicast_packets_transmitted_hi), - qstats->driver_xoff); + pr_debug("%s: tx pkt(%lu) (Xoff events %u)", + fp->name, + bnx2x_hilo( + &qstats->total_unicast_packets_transmitted_hi), + qstats->driver_xoff); for_each_cos_in_tx_queue(fp, cos) { txdata = &fp->txdata[cos]; txq = netdev_get_tx_queue(bp->dev, FP_COS_TO_TXQ(fp, cos)); - printk(KERN_DEBUG "%d: tx avail(%4u)" - " *tx_cons_sb(%u)" - " tx calls (%lu)" - " %s\n", - cos, - bnx2x_tx_avail(bp, txdata), - le16_to_cpu(*txdata->tx_cons_sb), - txdata->tx_pkt, - (netif_tx_queue_stopped(txq) ? - "Xoff" : "Xon") - ); + pr_debug("%d: tx avail(%4u) *tx_cons_sb(%u) tx calls (%lu) %s\n", + cos, + bnx2x_tx_avail(bp, txdata), + le16_to_cpu(*txdata->tx_cons_sb), + txdata->tx_pkt, + (netif_tx_queue_stopped(txq) ? + "Xoff" : "Xon") + ); } } } -- cgit v1.1