[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=X-4mg2SyKx870B1xN4uW+4NPuPL=Fv_cqYf--@mail.gmail.com>
Date: Sun, 28 Nov 2010 10:05:21 +0100
From: Michał Mirosław <mirqus@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Ben Hutchings <bhutchings@...arflare.com>,
Szymon Janc <szymon@...c.net.pl>, netdev@...r.kernel.org
Subject: Re: [PATCH 5/6] forcedeth: use KERN_ facility level in printk
2010/11/27 Joe Perches <joe@...ches.com>:
> On Sat, 2010-11-27 at 19:04 +0000, Ben Hutchings wrote:
>> On Sat, 2010-11-27 at 19:39 +0100, Szymon Janc wrote:
>> > diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
>> > index 2f092d7..a2b6681 100644
>> > --- a/drivers/net/forcedeth.c
>> > +++ b/drivers/net/forcedeth.c
>> > @@ -958,7 +958,7 @@ static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target,
>> > delaymax -= delay;
>> > if (delaymax < 0) {
>> > if (msg)
>> > - printk("%s", msg);
>> > + printk(KERN_WARNING "%s", msg);
>> No, msg already includes a log level.
>
> True. The messages are still broken though.
> Some have trailing newlines, others not.
>
> It'd be better to move the msg after the reg_delay
> call and add the missing newlines.
>
[...]
> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 0fa1776..2d11028f 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
[...]
> @@ -1547,9 +1544,9 @@ static void nv_stop_rx(struct net_device *dev)
> else
> rx_ctrl |= NVREG_RCVCTL_RX_PATH_EN;
> writel(rx_ctrl, base + NvRegReceiverControl);
> - reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX,
> - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy");
> + if (reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0,
> + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX))
> + printk(KERN_INFO "nv_stop_rx: ReceiverStatus remained busy\n");
You could change it to dev_info() and friends in one go.
> udelay(NV_RXSTOP_DELAY2);
> if (!np->mac_in_use)
[...]
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists