[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <82a06d33-b0c4-55bd-43ee-9953db9a559d@gmail.com>
Date: Sun, 5 Feb 2017 10:31:22 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Add watchdog interrupt
handler
On 02/05/2017 08:52 AM, Andrew Lunn wrote:
>>> +static irqreturn_t mv88e6xxx_g2_watchdog_thread_fn(int irq, void *dev_id)
>>> +{
>>> + u16 reg;
>>> +
>>> + struct mv88e6xxx_chip *chip = dev_id;
>>> +
>>> + mv88e6xxx_g2_read(chip, GLOBAL2_WDOG_CONTROL, ®);
>>> +
>>> + dev_info(chip->dev, "Watchdog event: %04x", reg);
>>
>> Should this be 0x%04x just to illustrate the value is hexadecimal? And
>
> Yes, the prefix would make sense.
>
>> should this be dev_info_once()?
>
> Since the next action is to disable the interrupt, and there is no
> code path to reenable it, _once does not seem needed. And if for some
> reason the kernel log is spammed with these messages, i want to
> know. It means my interrupt handling code is badly broken!
Sure, that makes sense then, thanks!
--
Florian
Powered by blists - more mailing lists