Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

reboot: move reboot_notifier_list to kernel/reboot.c

All the functions related to the reboot notifier list are in
kernel/reboot.c. Move the list itself, too. As there are no direct users
anymore, make the declaration static.

Link: https://lkml.kernel.org/r/20241012-reboot_notifier_list-v1-1-6093bb9455ce@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Thomas Weißschuh and committed by
Andrew Morton
f2fa0fd4 834b251b

+7 -10
-2
include/linux/notifier.h
··· 237 237 #define KBD_KEYSYM 0x0004 /* Keyboard keysym */ 238 238 #define KBD_POST_KEYSYM 0x0005 /* Called after keyboard keysym interpretation */ 239 239 240 - extern struct blocking_notifier_head reboot_notifier_list; 241 - 242 240 #endif /* __KERNEL__ */ 243 241 #endif /* _LINUX_NOTIFIER_H */
-8
kernel/notifier.c
··· 5 5 #include <linux/notifier.h> 6 6 #include <linux/rcupdate.h> 7 7 #include <linux/vmalloc.h> 8 - #include <linux/reboot.h> 9 8 10 9 #define CREATE_TRACE_POINTS 11 10 #include <trace/events/notifier.h> 12 - 13 - /* 14 - * Notifier list for kernel code which wants to be called 15 - * at shutdown. This is used to stop any idling DMA operations 16 - * and the like. 17 - */ 18 - BLOCKING_NOTIFIER_HEAD(reboot_notifier_list); 19 11 20 12 /* 21 13 * Notifier chain core routines. The exported routines below
+7
kernel/reboot.c
··· 72 72 */ 73 73 void __weak (*pm_power_off)(void); 74 74 75 + /* 76 + * Notifier list for kernel code which wants to be called 77 + * at shutdown. This is used to stop any idling DMA operations 78 + * and the like. 79 + */ 80 + static BLOCKING_NOTIFIER_HEAD(reboot_notifier_list); 81 + 75 82 /** 76 83 * emergency_restart - reboot the system 77 84 *