Commit bf24e136 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 46ccf725
...@@ -227,15 +227,14 @@ static void nicvf_handle_mbx_intr(struct nicvf *nic) ...@@ -227,15 +227,14 @@ static void nicvf_handle_mbx_intr(struct nicvf *nic)
nic->speed = mbx.link_status.speed; nic->speed = mbx.link_status.speed;
nic->mac_type = mbx.link_status.mac_type; nic->mac_type = mbx.link_status.mac_type;
if (nic->link_up) { if (nic->link_up) {
netdev_info(nic->netdev, "%s: Link is Up %d Mbps %s\n", netdev_info(nic->netdev, "Link is Up %d Mbps %s duplex\n",
nic->netdev->name, nic->speed, nic->speed,
nic->duplex == DUPLEX_FULL ? nic->duplex == DUPLEX_FULL ?
"Full duplex" : "Half duplex"); "Full" : "Half");
netif_carrier_on(nic->netdev); netif_carrier_on(nic->netdev);
netif_tx_start_all_queues(nic->netdev); netif_tx_start_all_queues(nic->netdev);
} else { } else {
netdev_info(nic->netdev, "%s: Link is Down\n", netdev_info(nic->netdev, "Link is Down\n");
nic->netdev->name);
netif_carrier_off(nic->netdev); netif_carrier_off(nic->netdev);
netif_tx_stop_all_queues(nic->netdev); netif_tx_stop_all_queues(nic->netdev);
} }
...@@ -721,8 +720,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev, ...@@ -721,8 +720,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev,
return; return;
if (netif_msg_pktdata(nic)) { if (netif_msg_pktdata(nic)) {
netdev_info(nic->netdev, "%s: skb 0x%p, len=%d\n", netdev->name, netdev_info(nic->netdev, "skb 0x%p, len=%d\n", skb, skb->len);
skb, skb->len);
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
skb->data, skb->len, true); skb->data, skb->len, true);
} }
...@@ -854,10 +852,8 @@ static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx, ...@@ -854,10 +852,8 @@ static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx,
netif_tx_wake_queue(txq); netif_tx_wake_queue(txq);
nic = nic->pnicvf; nic = nic->pnicvf;
this_cpu_inc(nic->drv_stats->txq_wake); this_cpu_inc(nic->drv_stats->txq_wake);
if (netif_msg_tx_err(nic)) netif_warn(nic, tx_err, netdev,
netdev_warn(netdev, "Transmit queue wakeup SQ%d\n", txq_idx);
"%s: Transmit queue wakeup SQ%d\n",
netdev->name, txq_idx);
} }
} }
...@@ -928,9 +924,8 @@ static void nicvf_handle_qs_err(unsigned long data) ...@@ -928,9 +924,8 @@ static void nicvf_handle_qs_err(unsigned long data)
static void nicvf_dump_intr_status(struct nicvf *nic) static void nicvf_dump_intr_status(struct nicvf *nic)
{ {
if (netif_msg_intr(nic)) netif_info(nic, intr, nic->netdev, "interrupt status 0x%llx\n",
netdev_info(nic->netdev, "%s: interrupt status 0x%llx\n", nicvf_reg_read(nic, NIC_VF_INT));
nic->netdev->name, nicvf_reg_read(nic, NIC_VF_INT));
} }
static irqreturn_t nicvf_misc_intr_handler(int irq, void *nicvf_irq) static 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,10 +1207,8 @@ static netdev_tx_t nicvf_xmit(struct sk_buff *skb, struct net_device *netdev)
netif_tx_wake_queue(txq); netif_tx_wake_queue(txq);
} else { } else {
this_cpu_inc(nic->drv_stats->txq_stop); this_cpu_inc(nic->drv_stats->txq_stop);
if (netif_msg_tx_err(nic)) netif_warn(nic, tx_err, netdev,
netdev_warn(netdev, "Transmit ring full, stopping SQ%d\n", qid);
"%s: Transmit ring full, stopping SQ%d\n",
netdev->name, qid);
} }
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
...@@ -1600,9 +1593,7 @@ static void nicvf_tx_timeout(struct net_device *dev) ...@@ -1600,9 +1593,7 @@ static void nicvf_tx_timeout(struct net_device *dev)
{ {
struct nicvf *nic = netdev_priv(dev); struct nicvf *nic = netdev_priv(dev);
if (netif_msg_tx_err(nic)) netif_warn(nic, tx_err, dev, "Transmit timed out, resetting\n");
netdev_warn(dev, "%s: Transmit timed out, resetting\n",
dev->name);
this_cpu_inc(nic->drv_stats->tx_timeout); this_cpu_inc(nic->drv_stats->tx_timeout);
schedule_work(&nic->reset_task); schedule_work(&nic->reset_task);
......
...@@ -1811,10 +1811,8 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx) ...@@ -1811,10 +1811,8 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx)
/* Check for errors in the receive cmp.queue entry */ /* Check for errors in the receive cmp.queue entry */
int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx) int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx)
{ {
if (netif_msg_rx_err(nic)) netif_err(nic, rx_err, nic->netdev,
netdev_err(nic->netdev, "RX error CQE err_level 0x%x err_opcode 0x%x\n",
"%s: RX error CQE err_level 0x%x err_opcode 0x%x\n",
nic->netdev->name,
cqe_rx->err_level, cqe_rx->err_opcode); cqe_rx->err_level, cqe_rx->err_opcode);
switch (cqe_rx->err_opcode) { switch (cqe_rx->err_opcode) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment