[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <170905450706.398.17494117981857072821.tip-bot2@tip-bot2>
Date: Tue, 27 Feb 2024 17:21:47 -0000
From:
tip-bot2 for Uwe Kleine-König <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: u.kleine-koenig@...gutronix.de, Thomas Gleixner <tglx@...utronix.de>,
Antonio Borneo <antonio.borneo@...s.st.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] irqchip/stm32-exti: Convert to
platform_driver::remove_new() callback
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 935603e8199991ac1f72c47a41a558f43f1a6004
Gitweb: https://git.kernel.org/tip/935603e8199991ac1f72c47a41a558f43f1a6004
Author: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
AuthorDate: Fri, 22 Dec 2023 23:50:43 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 27 Feb 2024 18:12:10 +01:00
irqchip/stm32-exti: Convert to platform_driver::remove_new() callback
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Antonio Borneo <antonio.borneo@...s.st.com>
Link: https://lore.kernel.org/r/ac551b89025bafadce05102b94596f8cd3564a32.1703284359.git.u.kleine-koenig@pengutronix.de
---
drivers/irqchip/irq-stm32-exti.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 971240e..26a5193 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -898,10 +898,9 @@ static void stm32_exti_remove_irq(void *data)
irq_domain_remove(domain);
}
-static int stm32_exti_remove(struct platform_device *pdev)
+static void stm32_exti_remove(struct platform_device *pdev)
{
stm32_exti_h_syscore_deinit();
- return 0;
}
static int stm32_exti_probe(struct platform_device *pdev)
@@ -991,10 +990,10 @@ MODULE_DEVICE_TABLE(of, stm32_exti_ids);
static struct platform_driver stm32_exti_driver = {
.probe = stm32_exti_probe,
- .remove = stm32_exti_remove,
+ .remove_new = stm32_exti_remove,
.driver = {
- .name = "stm32_exti",
- .of_match_table = stm32_exti_ids,
+ .name = "stm32_exti",
+ .of_match_table = stm32_exti_ids,
},
};
Powered by blists - more mailing lists