Re: [v2,1/2] watchdog: xen_wdt: use the watchdog subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2017-11-11 at 08:40 -0800, Guenter Roeck wrote:
> On Mon, Nov 06, 2017 at 07:04:11PM +0000, Radu Rendec wrote:
> > Change the xen_wdt driver to use the watchdog subsystem instead of
> > registering and manipulating the char device directly through the misc
> > API. This is mainly getting rid of the "write" and "ioctl" methods and
> > part of the watchdog control logic (which are all implemented by the
> > watchdog subsystem).
> > 
> > Even though the watchdog subsystem supports registering and handling
> > multiple watchdog devices at the same time, the xen_wdt driver has an
> > inherent limitation of only one device due to the way the Xen hypervisor
> > exposes watchdog functionality. However, the driver can now coexist with
> > other watchdog devices (supported by different drivers).
> > 
> > Signed-off-by: Radu Rendec <rrendec@xxxxxxxxxx>
> 
> I just noticed this escaped my attention, possibly because it was sent
> as reply to v1. Doesn't it say samewhere that you should not do that ?

Sorry about that. In the future, I will make sure to start a new thread
for new patch versions.

> dev_info has that odd "wdt: " header because DRV_NAME is set to "wdt",
> which doesn't really make much sense. Please use something more sensible
> for DRV_NAME and use dev_info.

The trouble is (was) that the device is matched against the driver by
the name, so the device name has to be the same as the driver name.
Then, regardless of what the name is, __dev_printk() will print it
twice (once as the driver name and once as the device name).

As a workaround, after looking at platform_match(), I added an id_table
to the platform_driver struct and now the match is done by that. Then
the driver name can be different.

I set the driver name to "xen_wdt" and the device name to "watchdog".
Now the messages (using dev_info()) look like this:

xen_wdt watchdog: initialized (timeout=60s, nowayout=0)

At least this looks more meaningful; I hope it's ok.

I will submit v3 of the patch (with these changes) in a separate
thread.

Thanks,
Radu
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux