Skip to contentSkip to conversation

rtc: at91rm9200: annotate at91_rtc_remove with __exit again

PATCH In review [email protected] 2 participants 2 messages Oct 16, 2023 – Oct 20, 2023

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 rtc: at91rm9200: annotate at91_rtc_remove with __exit again

From: Alexandre Belloni <[email protected]>

Without __exit, having the driver as a builtin after dropping the __exit annotation results in:

Quoted 1 line
Quoted 1 line

drivers/rtc/rtc-at91rm9200.c:561:13: warning: 'at91_rtc_remove' defined but not used [-Wunused-function]

561 | static void at91_rtc_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~

---
 drivers/rtc/rtc-at91rm9200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-at91rm9200.c +1 -1
index 3f5ff9867c02..c16fe711a0d9 100644
@@ -558,7 +558,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
 /*
  * Disable and remove the RTC driver
  */
-static void at91_rtc_remove(struct platform_device *pdev)
+static void __exit at91_rtc_remove(struct platform_device *pdev)
 {
 	/* Disable all interrupts */
 	at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
Signature · 1 line
2.41.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 16/10/2023 at 06:18, [email protected] wrote:

From: Alexandre Belloni <[email protected]>

Without __exit, having the driver as a builtin after dropping the __exit annotation results in:

Quoted 7 lines
Quoted 1 line
Quoted 1 line

drivers/rtc/rtc-at91rm9200.c:561:13: warning: 'at91_rtc_remove' defined but not used [-Wunused-function]

561 | static void at91_rtc_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~

Thanks Alexandre, best regards,
Nicolas

Quoted 20 lines
---
  drivers/rtc/rtc-at91rm9200.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-at91rm9200.c +1 -2
index 3f5ff9867c02..c16fe711a0d9 100644
@@ -558,7 +558,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
  /*
   * Disable and remove the RTC driver
   */
-static void at91_rtc_remove(struct platform_device *pdev)
+static void __exit at91_rtc_remove(struct platform_device *pdev)
  {
         /* Disable all interrupts */
         at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
--

2.41.0