From: Guenter Roeck <linux@roeck-us.net>
To: Judith Mendez <jm@ti.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: rti_wdt: Allow timeout config with timeout-sec
Date: Wed, 21 Aug 2024 16:28:02 -0700 [thread overview]
Message-ID: <a9de6e68-baac-4fe7-a05c-ca4d79ddd84e@roeck-us.net> (raw)
In-Reply-To: <20240821201935.1698146-1-jm@ti.com>
On Wed, Aug 21, 2024 at 03:19:35PM -0500, Judith Mendez wrote:
> Currently rti_wdt does not allow timeout to be configured
> via DT property timeout-sec, so fix watchdog_init_timeout
> to be able to use timeout-sec.
>
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---
> drivers/watchdog/rti_wdt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
> index 8e1be7ba01039..7260c67e60a25 100644
> --- a/drivers/watchdog/rti_wdt.c
> +++ b/drivers/watchdog/rti_wdt.c
> @@ -332,7 +332,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
> memunmap(vaddr);
> }
>
> - watchdog_init_timeout(wdd, heartbeat, dev);
> + wdd->timeout = heartbeat;
The proper fix would be to initialize the 'heartbeat' variable with 0,
set wdt->timeout to DEFAULT_HEARTBEAT, and to keep passing 'heartbeat'
to watchdog_init_timeout(). That used to be done but was explicitly
changed in an earlier commit, presumably on purpose. I am not inclined
to accept a (partial) revert unless the author of commit 5527483f confirms
that this is acceptable and desirable. Otherwise we'll just end up in an
edit war, which I really don't want to get into.
Guenter
`
> + watchdog_init_timeout(wdd, 0, dev);
>
> ret = watchdog_register_device(wdd);
> if (ret) {
>
> base-commit: 860bbe8e618fd62446309e286ab4a83d38201c0a
> --
> 2.46.0
>
next prev parent reply other threads:[~2024-08-21 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 20:19 Judith Mendez
2024-08-21 23:28 ` Guenter Roeck [this message]
2024-08-22 14:01 ` Judith Mendez
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=a9de6e68-baac-4fe7-a05c-ca4d79ddd84e@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jm@ti.com \
--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®