]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
watchdog: orion: use 0 for unset heartbeat
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Fri, 13 Mar 2020 03:13:12 +0000 (16:13 +1300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 1 Apr 2020 09:35:22 +0000 (11:35 +0200)
If the heartbeat module param is not specified we would get an error
message

  watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
  watchdog: f1020300.watchdog: falling back to default timeout (171)

This is because we were initialising heartbeat to -1. By removing the
initialisation (thus letting the C run time initialise it to 0) we
silence the warning message and the default timeout is still used.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200313031312.1485-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/orion_wdt.c

index 8e6dfe76f9c9d48affaa01a1f927eb25308acd2b..4ddb4ea2e4a32d1b2e23b31d016cf27238dd4171 100644 (file)
@@ -52,7 +52,7 @@
 #define WDT_A370_RATIO         (1 << WDT_A370_RATIO_SHIFT)
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static int heartbeat = -1;             /* module parameter (seconds) */
+static int heartbeat;          /* module parameter (seconds) */
 
 struct orion_watchdog;