From: Guenter Roeck <linux@roeck-us.net>
To: Phil Eichinger <phil@zankapfel.net>,
wim@linux-watchdog.org, joel@jms.id.au,
andrew@codeconstruct.com.au, linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: aspeed: replace mdelay with msleep
Date: Thu, 12 Dec 2024 05:56:14 -0800 [thread overview]
Message-ID: <3fe75eab-e700-4ae2-984b-42342ec7d784@roeck-us.net> (raw)
In-Reply-To: <20241212113014.1075414-1-phil@zankapfel.net>
On 12/12/24 03:30, Phil Eichinger wrote:
> Since it is not called in an atomic context the mdelay function
> can be replaced with msleep to avoid busy wait.
>
> Signed-off-by: Phil Eichinger <phil@zankapfel.net>
> ---
> drivers/watchdog/aspeed_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
> index b4773a6aaf8c..98ef341408f7 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -208,7 +208,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,
> wdt->ctrl &= ~WDT_CTRL_BOOT_SECONDARY;
> aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000);
>
> - mdelay(1000);
> + msleep(1000);
>
> return 0;
> }
This is a _restart_ handler. The only purpose of the delay is to wait
for the reset to trigger. It is not supposed to sleep.
NACK.
Guenter
next prev parent reply other threads:[~2024-12-12 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 11:30 [PATCH] watchdog: aspeed: replace mdelay with msleep Phil Eichinger
2024-12-12 13:56 ` Guenter Roeck [this message]
2024-12-14 21:21 ` David Laight
2024-12-14 21:46 ` Guenter Roeck
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=3fe75eab-e700-4ae2-984b-42342ec7d784@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andrew@codeconstruct.com.au \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=phil@zankapfel.net \
--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