From 093a6c67005148ae32a5c9e4553491b9f5c2457b Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:40:51 +0000
Subject: [PATCH] disable kernel build waring
---
kernel/include/linux/reboot.h | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/kernel/include/linux/reboot.h b/kernel/include/linux/reboot.h
index 64036b9..1c8d785 100644
--- a/kernel/include/linux/reboot.h
+++ b/kernel/include/linux/reboot.h
@@ -49,9 +49,25 @@
extern int unregister_restart_handler(struct notifier_block *);
extern void do_kernel_restart(char *cmd);
-extern int register_pre_restart_handler(struct notifier_block *);
-extern int unregister_pre_restart_handler(struct notifier_block *);
+#ifdef CONFIG_NO_GKI
+extern int register_pre_restart_handler(struct notifier_block *nb);
+extern int unregister_pre_restart_handler(struct notifier_block *nb);
extern void do_kernel_pre_restart(char *cmd);
+#else
+static inline int register_pre_restart_handler(struct notifier_block *nb)
+{
+ return 0;
+}
+
+static inline int unregister_pre_restart_handler(struct notifier_block *nb)
+{
+ return 0;
+}
+
+static inline void do_kernel_pre_restart(char *cmd)
+{
+}
+#endif
/*
* Architecture-specific implementations of sys_reboot commands.
--
Gitblit v1.6.2