linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter@roeck-us.net>
To: "Wang, Peng 1. (NSB - CN/Hangzhou)" <peng.1.wang@nokia-sbell.com>,
	Guenter Roeck <groeck7@gmail.com>
Cc: "wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] watchdog: make DesignWare watchdog allow users to set bigger timeout value
Date: Thu, 21 Nov 2019 21:38:47 -0800	[thread overview]
Message-ID: <2b2a1beb-d735-210c-847a-e3211f9efeca@roeck-us.net> (raw)
In-Reply-To: <dc8ce91610dd4860858bfe92f104d74a@nokia-sbell.com>

On 11/21/19 2:35 AM, Wang, Peng 1. (NSB - CN/Hangzhou) wrote:
>  From aabaa4b709bd451e566c906e8d1dca48f92f9b12 Mon Sep 17 00:00:00 2001
> From: Peng Wang <peng.1.wang@nokia-sbell.com>
> Date: Wed, 20 Nov 2019 15:12:59 +0800
> Subject: [PATCH] watchdog: make DesignWare watchdog allow users to set bigger
>   timeout value
>
> watchdog_dev.c provides means to allow users to set bigger timeout value
> than HW can support, make DesignWare watchdog align with this.
>
> ---
>
> v2 -> v1:
>         - use top_s to compare with wdd->max_hw_heartbeat_ms
>         - update wdd->timeout in case it's greater than HW supports
>         - fix comments error
>
> v1: initial version
>
> Signed-off-by: Peng Wang <peng.1.wang@nokia-sbell.com>

Sigh. I should have paid closer attention. Signed-off-by: has to be ahead of ---,

and the change log after it. The above format messes up everything.

Also, please run checkpatch and fix the problems it reports.

Sorry for not noticing it earlier. Please fix the problems and resubmit.

Thanks,

Guenter

> ---
>   drivers/watchdog/dw_wdt.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index fef7c61..12c116e 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -114,7 +114,15 @@ static int dw_wdt_set_timeout(struct watchdog_device *wdd, unsigned int top_s)
>   	writel(top_val | top_val << WDOG_TIMEOUT_RANGE_TOPINIT_SHIFT,
>   	       dw_wdt->regs + WDOG_TIMEOUT_RANGE_REG_OFFSET);
>   
> -	wdd->timeout = dw_wdt_top_in_seconds(dw_wdt, top_val);
> +	/*
> +	 * In case users set bigger timeout value than HW can support,
> +	 * kernel(watchdog_dev.c) helps to feed watchdog before
> +	 * wdd->max_hw_heartbeat_ms
> +	 */
> +	if ( top_s * 1000 <= wdd->max_hw_heartbeat_ms )
> +		wdd->timeout = dw_wdt_top_in_seconds(dw_wdt, top_val);
> +	else
> +		wdd->timeout = top_s;
>   
>   	return 0;
>   }



  parent reply	other threads:[~2019-11-22  5:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 10:35 [PATCH v2] watchdog: make DesignWare watchdog allow users to set bigger timeout value Wang, Peng 1. (NSB - CN/Hangzhou)
2019-11-21 14:15 ` Guenter Roeck
2019-11-22  1:16   ` Wang, Peng 1. (NSB - CN/Hangzhou)
2019-11-22  2:41     ` Guenter Roeck
2019-11-22  3:20       ` Wang, Peng 1. (NSB - CN/Hangzhou)
2019-11-22  5:38 ` Guenter Roeck [this message]
2019-11-25  1:37   ` Wang, Peng 1. (NSB - CN/Hangzhou)

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=2b2a1beb-d735-210c-847a-e3211f9efeca@roeck-us.net \
    --to=guenter@roeck-us.net \
    --cc=groeck7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=peng.1.wang@nokia-sbell.com \
    --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;
as well as URLs for NNTP newsgroup(s).