From: Guenter Roeck <linux@roeck-us.net>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>,
wim@linux-watchdog.org
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: orion: use 0 for unset heartbeat
Date: Thu, 12 Mar 2020 22:27:07 -0700 [thread overview]
Message-ID: <5d58b64d-e053-9f7f-49fe-682dc87fe817@roeck-us.net> (raw)
In-Reply-To: <20200313031312.1485-1-chris.packham@alliedtelesis.co.nz>
On 3/12/20 8:13 PM, Chris Packham wrote:
> 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>
Good catch.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/orion_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
> index 8e6dfe76f9c9..4ddb4ea2e4a3 100644
> --- a/drivers/watchdog/orion_wdt.c
> +++ b/drivers/watchdog/orion_wdt.c
> @@ -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;
>
>
prev parent reply other threads:[~2020-03-13 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 3:13 Chris Packham
2020-03-13 5:27 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d58b64d-e053-9f7f-49fe-682dc87fe817@roeck-us.net \
--to=linux@roeck-us.net \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®