From: Joe Perches <joe@perches.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH 4/6] au1000-eth: fix bad printk usages
Date: Mon, 09 Aug 2010 15:17:21 -0700 [thread overview]
Message-ID: <1281392241.1954.39.camel@Joe-Laptop.home> (raw)
In-Reply-To: <201008092203.41338.florian@openwrt.org>
On Mon, 2010-08-09 at 22:03 +0200, Florian Fainelli wrote:
> Use pr_(info|err) and pr_cont where required instead of calls to printk.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
> index 9a0515d..f8f1f5e 100644
> --- a/drivers/net/au1000_eth.c
> +++ b/drivers/net/au1000_eth.c
> @@ -732,24 +732,25 @@ 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: ");
This should be:
pr_err("rx_error(s):");
> if (status & RX_MISSED_FRAME)
> - printk("rx miss\n");
> + pr_cont("rx miss\n");
These blocks should be "pr_cont(" value");
with a leading space and without the "\n"
> if (status & RX_WDOG_TIMER)
> - printk("rx wdog\n");
> + pr_cont("rx wdog\n");
[etc]
> if (status & RX_U_CNTRL_FRAME)
> - printk("rx u control frame\n");
> + pr_cont("rx u control frame\n");
and finally a pr_cont("\n");
It'd also be good to add
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include
prev parent reply other threads:[~2010-08-09 22:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 20:03 [PATCH 4/6] au1000-eth: fix bad printk usages Florian Fainelli
2010-08-09 22:17 ` Joe Perches [this message]
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=1281392241.1954.39.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=florian@openwrt.org \
--cc=netdev@vger.kernel.org \
/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