diff mbox series

[15/16] watchdog: simatic-ipc-wdt: Fix type incompatibility with find_closest()

Message ID 20250515081332.151250-16-asoponar@taladin.ro
State New
Headers show
Series lib: Refactor find_closest() and find_closest_descending() from macros to lib functions | expand

Commit Message

Alexandru Soponar May 15, 2025, 8:13 a.m. UTC
The wd_timeout_table array was previously declared as unsigned int
but used with find_closest(), which takes signed int parameters. Change
this array from unsigned int to int to maintain type compatibility with
the find_closest() function signature and prevent compilation errors.

Signed-off-by: Alexandru Soponar <asoponar@taladin.ro>
---
 drivers/watchdog/simatic-ipc-wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/watchdog/simatic-ipc-wdt.c b/drivers/watchdog/simatic-ipc-wdt.c
index 1e91f0a560ff..36c68d2ed409 100644
--- a/drivers/watchdog/simatic-ipc-wdt.c
+++ b/drivers/watchdog/simatic-ipc-wdt.c
@@ -59,7 +59,7 @@  static struct resource io_resource_trigger =
 static struct resource mem_resource =
 	DEFINE_RES_MEM_NAMED(0, 0, "WD_RESET_BASE_ADR");
 
-static u32 wd_timeout_table[] = {2, 4, 6, 8, 16, 32, 48, 64 };
+static int wd_timeout_table[] = {2, 4, 6, 8, 16, 32, 48, 64 };
 static void __iomem *wd_reset_base_addr;
 
 static int wd_start(struct watchdog_device *wdd)