* [PATCH 4/7 v3] au1000-eth: fix bad printk usages
@ 2010-09-08 21:11 Florian Fainelli
2010-09-08 21:24 ` Joe Perches
2010-09-10 4:37 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2010-09-08 21:11 UTC (permalink / raw)
To: netdev, David Miller
Use pr_(info|err) and pr_cont where required instead of calls to printk.
Add missing pr_fmt to the driver.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index a2d86cf..f758b60 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -34,6 +34,8 @@
*
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/capability.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
@@ -720,24 +722,26 @@ static int au1000_rx(struct net_device *dev)
netif_rx(skb); /* pass the packet to upper layers */
} else {
if (au1000_debug > 4) {
+ pr_err("rx_error(s):");
if (status & RX_MISSED_FRAME)
- printk("rx miss\n");
+ pr_cont(" miss");
if (status & RX_WDOG_TIMER)
- printk("rx wdog\n");
+ pr_cont(" wdog");
if (status & RX_RUNT)
- printk("rx runt\n");
+ pr_cont(" runt");
if (status & RX_OVERLEN)
- printk("rx overlen\n");
+ pr_cont(" overlen");
if (status & RX_COLL)
- printk("rx coll\n");
+ pr_cont(" coll");
if (status & RX_MII_ERROR)
- printk("rx mii error\n");
+ pr_cont(" mii error");
if (status & RX_CRC_ERROR)
- printk("rx crc error\n");
+ pr_cont(" crc error");
if (status & RX_LEN_ERROR)
- printk("rx len error\n");
+ pr_cont(" len error");
if (status & RX_U_CNTRL_FRAME)
- printk("rx u control frame\n");
+ pr_cont(" u control frame");
+ pr_cont("\n");
}
}
prxd->buff_stat = (u32)(pDB->dma_addr | RX_DMA_ENABLE);
@@ -1199,7 +1203,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
netdev_info(dev, "Au1xx0 Ethernet found at 0x%lx, irq %d\n",
(unsigned long)base->start, irq);
if (version_printed++ == 0)
- printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR);
+ pr_info("%s version %s %s\n",
+ DRV_NAME, DRV_VERSION, DRV_AUTHOR);
return 0;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/7 v3] au1000-eth: fix bad printk usages
2010-09-08 21:11 [PATCH 4/7 v3] au1000-eth: fix bad printk usages Florian Fainelli
@ 2010-09-08 21:24 ` Joe Perches
2010-09-10 4:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2010-09-08 21:24 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, David Miller
On Wed, 2010-09-08 at 23:11 +0200, Florian Fainelli wrote:
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
> @@ -1199,7 +1203,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
> netdev_info(dev, "Au1xx0 Ethernet found at 0x%lx, irq %d\n",
> (unsigned long)base->start, irq);
> if (version_printed++ == 0)
> - printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR);
> + pr_info("%s version %s %s\n",
> + DRV_NAME, DRV_VERSION, DRV_AUTHOR);
You could also remove version_printed and use
printk_once(KERN_INFO etc...)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/7 v3] au1000-eth: fix bad printk usages
2010-09-08 21:11 [PATCH 4/7 v3] au1000-eth: fix bad printk usages Florian Fainelli
2010-09-08 21:24 ` Joe Perches
@ 2010-09-10 4:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-09-10 4:37 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Wed, 8 Sep 2010 23:11:45 +0200
>
> Use pr_(info|err) and pr_cont where required instead of calls to printk.
> Add missing pr_fmt to the driver.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Applied, please consider Joe Perches's feedback.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-10 4:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 21:11 [PATCH 4/7 v3] au1000-eth: fix bad printk usages Florian Fainelli
2010-09-08 21:24 ` Joe Perches
2010-09-10 4:37 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.