Re: [PATCH] Watchdog: sp5100_tco: Lower verbosity of disabled watchdog hardware

From: Guenter Roeck
Date: Mon May 09 2022 - 19:15:30 EST


On 5/9/22 16:10, Limonciello, Mario wrote:
[Public]



-----Original Message-----
From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter Roeck
Sent: Monday, May 9, 2022 17:56
To: Limonciello, Mario <Mario.Limonciello@xxxxxxx>; Wim Van Sebroeck
<wim@xxxxxxxxxxxxxxxxxx>; open list:WATCHDOG DEVICE DRIVERS <linux-
watchdog@xxxxxxxxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
Cc: ionut_n2001@xxxxxxxxx
Subject: Re: [PATCH] Watchdog: sp5100_tco: Lower verbosity of disabled
watchdog hardware

On 5/9/22 09:33, Mario Limonciello wrote:
If watchdog hardware has been disabled, currently the kernel driver
will show at err level during probe:

"Watchdog hardware is disabled"

This is unnecessarily verbose as there is already a -ENODEV returned.
Lower the level to debug.

Is it ? Without this message, a user may try to load the driver,
get an error message, and have no idea why the driver was not
enabled even though the hardware exists. If anything , -ENODEV
is less than perfect. Unfortunately there does not seem to be
a better error code, or at least I don't see one.

If it didn't have modaliases and users only manually loaded it; I would agree
with you. However it has MODULE_DEVICE_TABLE, so if that PCI device is around
then the driver will load either way. That would translate into an "error message"
on every boot if you have this module compiled and didn't manually try to load it.


Why don't you just blacklist the driver ?

Guenter