From 17d323e4e230daa623791ca37b56414b182fab36 Mon Sep 17 00:00:00 2001 From: maoxiaochuan Date: Mon, 24 Aug 2026 12:13:23 +0800 Subject: [PATCH] watchdog: loongson2: fix .remove callback return type mismatch Since Linux 6.11 (commit 0ed03dd1f63f), the platform_driver .remove callback returns void instead of int. ls2x_wdt_remove still returns int, triggering an -Werror=incompatible-pointer-types build error at the .remove = ls2x_wdt_remove assignment. Change ls2x_wdt_remove's return type to void and drop the return 0. --- drivers/watchdog/loongson2_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/loongson2_wdt.c b/drivers/watchdog/loongson2_wdt.c index 3648e8c1c..01cbc63a8 100644 --- a/drivers/watchdog/loongson2_wdt.c +++ b/drivers/watchdog/loongson2_wdt.c @@ -147,14 +147,12 @@ err0: return err; } -static int ls2x_wdt_remove(struct platform_device *pdev) +static void ls2x_wdt_remove(struct platform_device *pdev) { struct ls2x_wdt_drvdata *drvdata = platform_get_drvdata(pdev); watchdog_unregister_device(&drvdata->wdt); clk_disable_unprepare(drvdata->clk); - - return 0; } #ifdef CONFIG_OF