From: Joachim Eastwood <manabian@gmail.com>
To: nicolas.ferre@atmel.com, davem@davemloft.net
Cc: plagnioj@jcrosoft.com, netdev@vger.kernel.org,
Joachim Eastwood <manabian@gmail.com>
Subject: [PATCH 7/8] net/at91_ether: clean up print outs
Date: Wed, 7 Nov 2012 19:14:56 +0100 [thread overview]
Message-ID: <1352312097-31320-8-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1352312097-31320-1-git-send-email-manabian@gmail.com>
Convert all printk's to netdev_ counterparts and fix up some
printed texts.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
drivers/net/ethernet/cadence/at91_ether.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
index 67b66c4..cf0cf06 100644
--- a/drivers/net/ethernet/cadence/at91_ether.c
+++ b/drivers/net/ethernet/cadence/at91_ether.c
@@ -60,7 +60,7 @@ static int at91ether_start(struct net_device *dev)
MAX_RX_DESCR * sizeof(struct macb_dma_desc),
&lp->rx_ring_dma, GFP_KERNEL);
if (!lp->rx_ring) {
- netdev_err(lp->dev, "unable to alloc rx ring DMA buffer\n");
+ netdev_err(dev, "unable to alloc rx ring DMA buffer\n");
return -ENOMEM;
}
@@ -68,7 +68,7 @@ static int at91ether_start(struct net_device *dev)
MAX_RX_DESCR * MAX_RBUFF_SZ,
&lp->rx_buffers_dma, GFP_KERNEL);
if (!lp->rx_buffers) {
- netdev_err(lp->dev, "unable to alloc rx data DMA buffer\n");
+ netdev_err(dev, "unable to alloc rx data DMA buffer\n");
dma_free_coherent(&lp->pdev->dev,
MAX_RX_DESCR * sizeof(struct macb_dma_desc),
@@ -189,7 +189,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
macb_writel(lp, TCR, skb->len);
} else {
- printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n");
+ netdev_err(dev, "%s called, but device is busy!\n", __func__);
return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
on this skb, he also reports -ENETDOWN and printk's, so either
we free and return(0) or don't free and return 1 */
@@ -279,7 +279,7 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id)
}
if (intstatus & MACB_BIT(ISR_ROVR))
- printk("%s: ROVR error\n", dev->name);
+ netdev_err(dev, "ROVR error\n");
return IRQ_HANDLED;
}
@@ -449,14 +449,11 @@ static int __init at91ether_probe(struct platform_device *pdev)
phydev = lp->phy_dev;
netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
- phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
+ phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
/* Display ethernet banner */
- printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%pM)\n",
- dev->name, (uint) dev->base_addr, dev->irq,
- macb_readl(lp, NCFGR) & MACB_BIT(SPD) ? "100-" : "10-",
- macb_readl(lp, NCFGR) & MACB_BIT(FD) ? "FullDuplex" : "HalfDuplex",
- dev->dev_addr);
+ netdev_info(dev, "AT91 ethernet at 0x%08lx int=%d (%pM)\n",
+ dev->base_addr, dev->irq, dev->dev_addr);
return 0;
--
1.8.0
next prev parent reply other threads:[~2012-11-07 18:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 18:14 [PATCH 0/8] at91_ether share stats/address setting with macb Joachim Eastwood
2012-11-07 18:14 ` [PATCH 1/8] net/macb: check all address registers sets Joachim Eastwood
2012-11-07 18:14 ` [PATCH 2/8] net/macb: support reversed hw addr Joachim Eastwood
2012-11-07 18:14 ` [PATCH 3/8] net/macb: export macb_set_hwaddr and macb_get_hwaddr Joachim Eastwood
2012-11-07 18:14 ` [PATCH 4/8] net/at91_ether: use macb functions for get/set hwaddr Joachim Eastwood
2012-11-07 18:14 ` [PATCH 5/8] net/at91_ether: use stat function from macb Joachim Eastwood
2012-11-07 18:14 ` [PATCH 6/8] net/at91_ether: drop board_data private struct member Joachim Eastwood
2012-11-07 18:14 ` Joachim Eastwood [this message]
2012-11-07 18:14 ` [PATCH 8/8] net/at91_ether: fix comment and style issues Joachim Eastwood
2012-11-07 22:45 ` [PATCH 0/8] at91_ether share stats/address setting with macb David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352312097-31320-8-git-send-email-manabian@gmail.com \
--to=manabian@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).