From: Guenter Roeck <linux@roeck-us.net>
To: fu.wei@linaro.org
Cc: wim@iguana.be, panand@redhat.com, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linaro-acpi@lists.linaro.org, timur@codeaurora.org,
dyoung@redhat.com, graeme.gregory@linaro.org,
al.stone@linaro.org, jcm@redhat.com,
Suravee.Suthikulpanit@amd.com
Subject: Re: [PATCH 1/3] watchdog: skip min and max timeout validity check when max_hw_heartbeat_ms is defined
Date: Wed, 1 Jun 2016 14:40:08 -0700 [thread overview]
Message-ID: <20160601214008.GA2841@roeck-us.net> (raw)
In-Reply-To: <1464674890-10512-2-git-send-email-fu.wei@linaro.org>
On Tue, May 31, 2016 at 02:08:08PM +0800, fu.wei@linaro.org wrote:
> From: Pratyush Anand <panand@redhat.com>
>
> When max_hw_heartbeat_ms has a none zero value, max_timeout is not used.
> So it's value can be 0. In such case if a driver uses min_timeout
> functionality, then check will always fail.
>
> This patch fixes above issue.
>
> Signed-off-by: Pratyush Anand <panand@redhat.com>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/watchdog_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
> index 7c3ba58..65e62d1 100644
> --- a/drivers/watchdog/watchdog_core.c
> +++ b/drivers/watchdog/watchdog_core.c
> @@ -88,7 +88,7 @@ static void watchdog_check_min_max_timeout(struct watchdog_device *wdd)
> * Check that we have valid min and max timeout values, if
> * not reset them both to 0 (=not used or unknown)
> */
> - if (wdd->min_timeout > wdd->max_timeout) {
> + if (!wdd->max_hw_heartbeat_ms && wdd->min_timeout > wdd->max_timeout) {
> pr_info("Invalid min and max timeout values, resetting to 0!\n");
> wdd->min_timeout = 0;
> wdd->max_timeout = 0;
> --
> 2.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-01 21:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 6:08 [PATCH 0/3] watchdog, sbsa_gwdt: Update SBSA watchdog with the new infrastructure of watchdog fu.wei
2016-05-31 6:08 ` [PATCH 1/3] watchdog: skip min and max timeout validity check when max_hw_heartbeat_ms is defined fu.wei
2016-06-01 21:40 ` Guenter Roeck [this message]
2016-05-31 6:08 ` [PATCH 2/3] sbsa_gwdt: Use max_hw_heartbeat_ms instead of max_timeout fu.wei
2016-06-01 21:43 ` Guenter Roeck
2016-05-31 6:08 ` [PATCH 3/3] sbsa_gwdt: Set WDOG_HW_RUNNING, when watchdog is already running fu.wei
2016-06-01 21:43 ` Guenter Roeck
2016-07-17 19:51 ` [PATCH 0/3] watchdog, sbsa_gwdt: Update SBSA watchdog with the new infrastructure of watchdog Wim Van Sebroeck
2016-07-18 15:21 ` Fu Wei
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=20160601214008.GA2841@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=al.stone@linaro.org \
--cc=dyoung@redhat.com \
--cc=fu.wei@linaro.org \
--cc=graeme.gregory@linaro.org \
--cc=jcm@redhat.com \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=panand@redhat.com \
--cc=timur@codeaurora.org \
--cc=wim@iguana.be \
/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;
as well as URLs for NNTP newsgroup(s).