Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: aspeed: fix 64-bit division

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>
Link: https://lore.kernel.org/r/20250314160248.502324-1-arnd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Arnd Bergmann and committed by
Wim Van Sebroeck
48a13663 ad374670

+1 -1
+1 -1
drivers/watchdog/aspeed_wdt.c
··· 254 254 255 255 if (!of_device_is_compatible(pdev->dev.of_node, "aspeed,ast2400-wdt")) { 256 256 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 257 - idx = ((intptr_t)wdt->base & 0x00000fff) / resource_size(res); 257 + idx = ((intptr_t)wdt->base & 0x00000fff) / (uintptr_t)resource_size(res); 258 258 } 259 259 260 260 scu_base = syscon_regmap_lookup_by_compatible(scu.compatible);