aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-06-27 06:56:54 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-29 12:25:33 -0400
commitbf24e136a32eb513195b6e0148e5a70131a95494 (patch)
tree287810cb4e635feec4d4ad78f50168824224a625
parent46ccf725bff81693aff8f02b588a2c68566a0b92 (diff)
cavium: thunder: Remove duplicate "netdev->name" logging output
Using netdev_<level>(netdev, "%s: ...", netdev->name) duplicates the name in the output. Remove those uses. Miscellanea: o Use the netif_<level> convenience macros at the same time Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cavium/thunder/nicvf_main.c33
-rw-r--r--drivers/net/ethernet/cavium/thunder/nicvf_queues.c8
2 files changed, 15 insertions, 26 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index 573755b0a51b..49b80da51ba7 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -227,15 +227,14 @@ static void nicvf_handle_mbx_intr(struct nicvf *nic)
227 nic->speed = mbx.link_status.speed; 227 nic->speed = mbx.link_status.speed;
228 nic->mac_type = mbx.link_status.mac_type; 228 nic->mac_type = mbx.link_status.mac_type;
229 if (nic->link_up) { 229 if (nic->link_up) {
230 netdev_info(nic->netdev, "%s: Link is Up %d Mbps %s\n", 230 netdev_info(nic->netdev, "Link is Up %d Mbps %s duplex\n",
231 nic->netdev->name, nic->speed, 231 nic->speed,
232 nic->duplex == DUPLEX_FULL ? 232 nic->duplex == DUPLEX_FULL ?
233 "Full duplex" : "Half duplex"); 233 "Full" : "Half");
234 netif_carrier_on(nic->netdev); 234 netif_carrier_on(nic->netdev);
235 netif_tx_start_all_queues(nic->netdev); 235 netif_tx_start_all_queues(nic->netdev);
236 } else { 236 } else {
237 netdev_info(nic->netdev, "%s: Link is Down\n", 237 netdev_info(nic->netdev, "Link is Down\n");
238 nic->netdev->name);
239 netif_carrier_off(nic->netdev); 238 netif_carrier_off(nic->netdev);
240 netif_tx_stop_all_queues(nic->netdev); 239 netif_tx_stop_all_queues(nic->netdev);
241 } 240 }
@@ -721,8 +720,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev,
721 return; 720 return;
722 721
723 if (netif_msg_pktdata(nic)) { 722 if (netif_msg_pktdata(nic)) {
724 netdev_info(nic->netdev, "%s: skb 0x%p, len=%d\n", netdev->name, 723 netdev_info(nic->netdev, "skb 0x%p, len=%d\n", skb, skb->len);
725 skb, skb->len);
726 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, 724 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
727 skb->data, skb->len, true); 725 skb->data, skb->len, true);
728 } 726 }
@@ -854,10 +852,8 @@ done:
854 netif_tx_wake_queue(txq); 852 netif_tx_wake_queue(txq);
855 nic = nic->pnicvf; 853 nic = nic->pnicvf;
856 this_cpu_inc(nic->drv_stats->txq_wake); 854 this_cpu_inc(nic->drv_stats->txq_wake);
857 if (netif_msg_tx_err(nic)) 855 netif_warn(nic, tx_err, netdev,
858 netdev_warn(netdev, 856 "Transmit queue wakeup SQ%d\n", txq_idx);
859 "%s: Transmit queue wakeup SQ%d\n",
860 netdev->name, txq_idx);
861 } 857 }
862 } 858 }
863 859
@@ -928,9 +924,8 @@ static void nicvf_handle_qs_err(unsigned long data)
928 924
929static void nicvf_dump_intr_status(struct nicvf *nic) 925static void nicvf_dump_intr_status(struct nicvf *nic)
930{ 926{
931 if (netif_msg_intr(nic)) 927 netif_info(nic, intr, nic->netdev, "interrupt status 0x%llx\n",
932 netdev_info(nic->netdev, "%s: interrupt status 0x%llx\n", 928 nicvf_reg_read(nic, NIC_VF_INT));
933 nic->netdev->name, nicvf_reg_read(nic, NIC_VF_INT));
934} 929}
935 930
936static irqreturn_t nicvf_misc_intr_handler(int irq, void *nicvf_irq) 931static irqreturn_t nicvf_misc_intr_handler(int irq, void *nicvf_irq)
@@ -1212,10 +1207,8 @@ static netdev_tx_t nicvf_xmit(struct sk_buff *skb, struct net_device *netdev)
1212 netif_tx_wake_queue(txq); 1207 netif_tx_wake_queue(txq);
1213 } else { 1208 } else {
1214 this_cpu_inc(nic->drv_stats->txq_stop); 1209 this_cpu_inc(nic->drv_stats->txq_stop);
1215 if (netif_msg_tx_err(nic)) 1210 netif_warn(nic, tx_err, netdev,
1216 netdev_warn(netdev, 1211 "Transmit ring full, stopping SQ%d\n", qid);
1217 "%s: Transmit ring full, stopping SQ%d\n",
1218 netdev->name, qid);
1219 } 1212 }
1220 return NETDEV_TX_BUSY; 1213 return NETDEV_TX_BUSY;
1221 } 1214 }
@@ -1600,9 +1593,7 @@ static void nicvf_tx_timeout(struct net_device *dev)
1600{ 1593{
1601 struct nicvf *nic = netdev_priv(dev); 1594 struct nicvf *nic = netdev_priv(dev);
1602 1595
1603 if (netif_msg_tx_err(nic)) 1596 netif_warn(nic, tx_err, dev, "Transmit timed out, resetting\n");
1604 netdev_warn(dev, "%s: Transmit timed out, resetting\n",
1605 dev->name);
1606 1597
1607 this_cpu_inc(nic->drv_stats->tx_timeout); 1598 this_cpu_inc(nic->drv_stats->tx_timeout);
1608 schedule_work(&nic->reset_task); 1599 schedule_work(&nic->reset_task);
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 2b181762ad49..d4496e9afcdf 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1811,11 +1811,9 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx)
1811/* Check for errors in the receive cmp.queue entry */ 1811/* Check for errors in the receive cmp.queue entry */
1812int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx) 1812int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx)
1813{ 1813{
1814 if (netif_msg_rx_err(nic)) 1814 netif_err(nic, rx_err, nic->netdev,
1815 netdev_err(nic->netdev, 1815 "RX error CQE err_level 0x%x err_opcode 0x%x\n",
1816 "%s: RX error CQE err_level 0x%x err_opcode 0x%x\n", 1816 cqe_rx->err_level, cqe_rx->err_opcode);
1817 nic->netdev->name,
1818 cqe_rx->err_level, cqe_rx->err_opcode);
1819 1817
1820 switch (cqe_rx->err_opcode) { 1818 switch (cqe_rx->err_opcode) {
1821 case CQ_RX_ERROP_RE_PARTIAL: 1819 case CQ_RX_ERROP_RE_PARTIAL: