diff mbox series

[16/16] ARM: xip-kernel: add __inflate_kernel_data prototype

Message ID 20230516154605.517690-17-arnd@kernel.org
State New
Headers show
Series ARM: address -Wmissing-prototype warnings | expand

Commit Message

Arnd Bergmann May 16, 2023, 3:46 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The kernel .data decompression is called from assembler, so it does
not need a prototype, but adding one avoids this W=1 warning:

arch/arm/kernel/head-inflate-data.c:35:12: error: no previous prototype for '__inflate_kernel_data' [-Werror=missing-prototypes]

The same file contains a few extern declarations for assembler
symbols, move those into the header as well for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 arch/arm/kernel/head-inflate-data.c | 5 +----
 arch/arm/kernel/head.h              | 8 ++++++++
 2 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/kernel/head.h
diff mbox series


diff --git a/arch/arm/kernel/head-inflate-data.c b/arch/arm/kernel/head-inflate-data.c
index 89a52104d32a..225c0699a12c 100644
--- a/arch/arm/kernel/head-inflate-data.c
+++ b/arch/arm/kernel/head-inflate-data.c
@@ -8,16 +8,13 @@ 
 #include <linux/init.h>
 #include <linux/zutil.h>
+#include "head.h"
 /* for struct inflate_state */
 #include "../../../lib/zlib_inflate/inftrees.h"
 #include "../../../lib/zlib_inflate/inflate.h"
 #include "../../../lib/zlib_inflate/infutil.h"
-extern char __data_loc[];
-extern char _edata_loc[];
-extern char _sdata[];
  * This code is called very early during the boot process to decompress
  * the .data segment stored compressed in ROM. Therefore none of the global
diff --git a/arch/arm/kernel/head.h b/arch/arm/kernel/head.h
new file mode 100644
index 000000000000..6eccf98fc2cc
--- /dev/null
+++ b/arch/arm/kernel/head.h
@@ -0,0 +1,8 @@ 
+// SPDX-License-Identifier: GPL-2.0-only
+extern char __data_loc[];
+extern char _edata_loc[];
+extern char _sdata[];
+int __init __inflate_kernel_data(void);