diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-08-17 15:44:26 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-18 09:03:14 +0200 |
commit | 81554d10b22a211e4598a067a0f84b6e9e492669 (patch) | |
tree | 09d6b24bb8474191df7fe1a31dcdfe85ad905768 | |
parent | powerpc/4xx: Remove WatchdogHandler() to fix no previous prototype error (diff) | |
download | linux-81554d10b22a211e4598a067a0f84b6e9e492669.tar.xz linux-81554d10b22a211e4598a067a0f84b6e9e492669.zip |
powerpc/4xx: Remove pika_dtm_[un]register_shutdown() to fix no previous prototype
ppc4xx_defconfig with W=1 results in:
CC arch/powerpc/platforms/44x/warp.o
arch/powerpc/platforms/44x/warp.c:369:5: error: no previous prototype for 'pika_dtm_register_shutdown' [-Werror=missing-prototypes]
369 | int pika_dtm_register_shutdown(void (*func)(void *arg), void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/44x/warp.c:374:5: error: no previous prototype for 'pika_dtm_unregister_shutdown' [-Werror=missing-prototypes]
374 | int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
The functions were added by commit 4ebef31fa6e0 ("[POWERPC] PIKA Warp:
Update platform code to support Rev B boards")
Those functions are not used localy and allthough their symbols are
exported they are not declared in any header file so they can't be used.
Remove them, then remove the associated list as it will now remain empty
hence becomes useless.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/830923f0e0375a14609204246d302c7476a8f948.1692279855.git.christophe.leroy@csgroup.eu
-rw-r--r-- | arch/powerpc/platforms/44x/warp.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index bfeb9bdc3258..bf0188dcb918 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c @@ -83,45 +83,8 @@ static int __init warp_post_info(void) #ifdef CONFIG_SENSORS_AD7414 -static LIST_HEAD(dtm_shutdown_list); static void __iomem *dtm_fpga; -struct dtm_shutdown { - struct list_head list; - void (*func)(void *arg); - void *arg; -}; - -int pika_dtm_register_shutdown(void (*func)(void *arg), void *arg) -{ - struct dtm_shutdown *shutdown; - - shutdown = kmalloc(sizeof(struct dtm_shutdown), GFP_KERNEL); - if (shutdown == NULL) - return -ENOMEM; - - shutdown->func = func; - shutdown->arg = arg; - - list_add(&shutdown->list, &dtm_shutdown_list); - - return 0; -} - -int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg) -{ - struct dtm_shutdown *shutdown; - - list_for_each_entry(shutdown, &dtm_shutdown_list, list) - if (shutdown->func == func && shutdown->arg == arg) { - list_del(&shutdown->list); - kfree(shutdown); - return 0; - } - - return -EINVAL; -} - #define WARP_GREEN_LED 0 #define WARP_RED_LED 1 @@ -153,17 +116,12 @@ static struct platform_device warp_gpio_leds = { static irqreturn_t temp_isr(int irq, void *context) { - struct dtm_shutdown *shutdown; int value = 1; local_irq_disable(); gpiod_set_value(warp_gpio_led_pins[WARP_GREEN_LED].gpiod, 0); - /* Run through the shutdown list. */ - list_for_each_entry(shutdown, &dtm_shutdown_list, list) - shutdown->func(shutdown->arg); - printk(KERN_EMERG "\n\nCritical Temperature Shutdown\n\n"); while (1) { @@ -366,19 +324,6 @@ machine_late_initcall(warp, pika_dtm_start); #else /* !CONFIG_SENSORS_AD7414 */ -int pika_dtm_register_shutdown(void (*func)(void *arg), void *arg) -{ - return 0; -} - -int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg) -{ - return 0; -} - machine_late_initcall(warp, warp_post_info); #endif - -EXPORT_SYMBOL(pika_dtm_register_shutdown); -EXPORT_SYMBOL(pika_dtm_unregister_shutdown); |