From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Bernhard Beschow <shentey@gmail.com>,
qemu-devel@nongnu.org, Guenter Roeck <linux@roeck-us.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Michael Tokarev <mjt@tls.msk.ru>,
Laurent Vivier <laurent@vivier.eu>,
Jean-Christophe Dubois <jcd@tribudubois.net>,
qemu-trivial@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH 3/3] hw/watchdog/wdt_imx2: Remove redundant assignment
Date: Mon, 13 May 2024 13:34:52 +0200 [thread overview]
Message-ID: <55a9cc05-7f64-4ebe-b552-aae3c67e1f5d@linaro.org> (raw)
In-Reply-To: <20240513101108.5237-4-shentey@gmail.com>
On 13/5/24 12:11, Bernhard Beschow wrote:
> The same statement is executed unconditionally right before the if statement.
>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>
> ---
>
> The duplicate line may indicate a bug. I'm not familiar with the code, so this
> patch may go into the wrong direction. Please check!
The bug might be in imx2_wdt_write() where the WRSR register is
overwritten, shouldn't we OR the SFTW bit, keeping other (such
TOUT) set?
if (!(value & IMX2_WDT_WCR_SRS)) {
s->wrsr = IMX2_WDT_WRSR_SFTW;
}
> ---
> hw/watchdog/wdt_imx2.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c
> index 6452fc4721..f9a7ea287f 100644
> --- a/hw/watchdog/wdt_imx2.c
> +++ b/hw/watchdog/wdt_imx2.c
> @@ -39,7 +39,6 @@ static void imx2_wdt_expired(void *opaque)
>
> /* Perform watchdog action if watchdog is enabled */
> if (s->wcr & IMX2_WDT_WCR_WDE) {
> - s->wrsr = IMX2_WDT_WRSR_TOUT;
> watchdog_perform_action();
> }
> }
next prev parent reply other threads:[~2024-05-13 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 10:11 [PATCH 0/3] Trivial ARM changes Bernhard Beschow
2024-05-13 10:11 ` [PATCH 1/3] hw/rtc/ds1338: Trace send and receive operations Bernhard Beschow
2024-05-13 11:26 ` Philippe Mathieu-Daudé
2024-05-13 10:11 ` [PATCH 2/3] hw/timer/imx_gpt: Convert DPRINTF to trace events Bernhard Beschow
2024-05-13 11:30 ` Philippe Mathieu-Daudé
2024-05-13 18:42 ` Bernhard Beschow
2024-05-13 10:11 ` [PATCH 3/3] hw/watchdog/wdt_imx2: Remove redundant assignment Bernhard Beschow
2024-05-13 11:34 ` Philippe Mathieu-Daudé [this message]
2024-05-13 14:43 ` 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=55a9cc05-7f64-4ebe-b552-aae3c67e1f5d@linaro.org \
--to=philmd@linaro.org \
--cc=jcd@tribudubois.net \
--cc=laurent@vivier.eu \
--cc=linux@roeck-us.net \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=shentey@gmail.com \
/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).