From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
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: fix 64-bit division
Date: Fri, 14 Mar 2025 10:55:05 -0700 [thread overview]
Message-ID: <e53b32db-7059-4167-992e-d461a996b122@roeck-us.net> (raw)
In-Reply-To: <20250314160248.502324-1-arnd@kernel.org>
On 3/14/25 09:02, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> On 32-bit architectures, the new calculation causes a build failure:
>
> ld.lld-21: error: undefined symbol: __aeabi_uldivmod
>
> Since neither value is ever larger than a register, cast both
> sides into a uintptr_t.
>
> Fixes: 5c03f9f4d362 ("watchdog: aspeed: Update bootstatus handling")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.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 369635b38ca0..837e15701c0e 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -254,7 +254,7 @@ static void aspeed_wdt_update_bootstatus(struct platform_device *pdev,
>
> if (!of_device_is_compatible(pdev->dev.of_node, "aspeed,ast2400-wdt")) {
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - idx = ((intptr_t)wdt->base & 0x00000fff) / resource_size(res);
> + idx = ((intptr_t)wdt->base & 0x00000fff) / (uintptr_t)resource_size(res);
> }
>
> scu_base = syscon_regmap_lookup_by_compatible(scu.compatible);
next prev parent reply other threads:[~2025-03-14 17:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 16:02 Arnd Bergmann
2025-03-14 17:37 ` Guenter Roeck
2025-03-14 17:39 ` Arnd Bergmann
2025-03-14 17:54 ` Guenter Roeck
2025-03-14 17:55 ` Guenter Roeck [this message]
2025-03-18 0:30 ` Andrew Jeffery
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=e53b32db-7059-4167-992e-d461a996b122@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andrew@codeconstruct.com.au \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chin-ting_kuo@aspeedtech.com \
--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=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®