From: Arnd Bergmann <arnd@kernel.org>
To: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Oleg Nesterov <oleg@redhat.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>,
Linus Walleij <linus.walleij@linaro.org>,
Ard Biesheuvel <ardb@kernel.org>,
Kees Cook <keescook@chromium.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: [PATCH 15/16] ARM: decompressor: move function prototypes to misc.h
Date: Tue, 16 May 2023 17:46:04 +0200 [thread overview]
Message-ID: <20230516154605.517690-16-arnd@kernel.org> (raw)
In-Reply-To: <20230516154605.517690-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
A number of prototypes are missing for the decompressor, some
of them are in the .c files that contain the callers, but are
invisible at the function definition:
arch/arm/boot/compressed/misc.c:129:17: error: no previous prototype for '__div0' [-Werror=missing-prototypes]
arch/arm/boot/compressed/misc.c:138:1: error: no previous prototype for 'decompress_kernel' [-Werror=missing-prototypes]
arch/arm/boot/compressed/misc.c:163:6: error: no previous prototype for 'fortify_panic' [-Werror=missing-prototypes]
arch/arm/boot/compressed/decompress.c:63:5: error: no previous prototype for 'do_decompress' [-Werror=missing-prototypes]
arch/arm/boot/compressed/fdt_check_mem_start.c:63:10: error: no previous prototype for 'fdt_check_mem_start' [-Werror=missing-prototypes]
Move these all to misc.h so they are visible by the callee as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/boot/compressed/atags_to_fdt.c | 1 +
arch/arm/boot/compressed/fdt_check_mem_start.c | 1 +
arch/arm/boot/compressed/misc.c | 6 ------
arch/arm/boot/compressed/misc.h | 11 +++++++++++
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index c579d9c42fd4..b584e091f702 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -2,6 +2,7 @@
#include <linux/libfdt_env.h>
#include <asm/setup.h>
#include <libfdt.h>
+#include "misc.h"
#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
#define do_extend_cmdline 1
diff --git a/arch/arm/boot/compressed/fdt_check_mem_start.c b/arch/arm/boot/compressed/fdt_check_mem_start.c
index 9291a2661bdf..aa856567fd33 100644
--- a/arch/arm/boot/compressed/fdt_check_mem_start.c
+++ b/arch/arm/boot/compressed/fdt_check_mem_start.c
@@ -3,6 +3,7 @@
#include <linux/kernel.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
+#include "misc.h"
static const void *get_prop(const void *fdt, const char *node_path,
const char *property, int minlen)
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index abfed1aa2baa..6b4baa6a9a50 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -103,9 +103,6 @@ static void putstr(const char *ptr)
/*
* gzip declarations
*/
-extern char input_data[];
-extern char input_data_end[];
-
unsigned char *output_data;
unsigned long free_mem_ptr;
@@ -131,9 +128,6 @@ asmlinkage void __div0(void)
error("Attempting division by 0!");
}
-extern int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x));
-
-
void
decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
unsigned long free_mem_ptr_end_p,
diff --git a/arch/arm/boot/compressed/misc.h b/arch/arm/boot/compressed/misc.h
index c958dccd1d97..6da00a26ac08 100644
--- a/arch/arm/boot/compressed/misc.h
+++ b/arch/arm/boot/compressed/misc.h
@@ -6,5 +6,16 @@
void error(char *x) __noreturn;
extern unsigned long free_mem_ptr;
extern unsigned long free_mem_end_ptr;
+void __div0(void);
+void
+decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
+ unsigned long free_mem_ptr_end_p, int arch_id);
+void fortify_panic(const char *name);
+int atags_to_fdt(void *atag_list, void *fdt, int total_space);
+uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt);
+int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x));
+
+extern char input_data[];
+extern char input_data_end[];
#endif
--
2.39.2
next prev parent reply other threads:[~2023-05-16 15:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 15:45 [PATCH 00/16] ARM: address -Wmissing-prototype warnings Arnd Bergmann
2023-05-16 15:45 ` [PATCH 01/16] ARM: dma-mapping: hide unused dma_contiguous_early_fixup function Arnd Bergmann
2023-05-16 15:45 ` [PATCH 02/16] ARM: traps: hide unused functions on NOMMU Arnd Bergmann
2023-05-16 15:45 ` [PATCH 03/16] ARM: vfp: include asm/neon.h in vfpmodule.c Arnd Bergmann
2023-05-16 15:45 ` [PATCH 04/16] ARM: vdso: add missing prototypes Arnd Bergmann
2023-05-16 15:45 ` [PATCH 05/16] ARM: kprobes: avoid missing-declaration warnings Arnd Bergmann
2023-05-17 1:29 ` Masami Hiramatsu
2023-05-16 15:45 ` [PATCH 06/16] ARM: tcm: move tcm_init() prototype to asm/tcm.h Arnd Bergmann
2023-05-22 7:34 ` Linus Walleij
2023-05-16 15:45 ` [PATCH 07/16] ARM: add prototype for function called only from asm Arnd Bergmann
2023-05-16 15:45 ` [PATCH 08/16] ARM: add clear/copy_user_highpage declarations Arnd Bergmann
2023-05-16 15:45 ` [PATCH 09/16] ARM: cacheflush: avoid __flush_anon_page() missing-prototype warning Arnd Bergmann
2023-05-16 15:45 ` [PATCH 10/16] ARM: nommu: include asm/idmap.h Arnd Bergmann
2023-05-16 15:46 ` [PATCH 11/16] ARM: move setup functions to header Arnd Bergmann
2023-05-22 7:35 ` Linus Walleij
2023-05-16 15:46 ` [PATCH 12/16] ARM: fiq: include asm/mach/irq.h for prototypes Arnd Bergmann
2023-05-16 15:46 ` [PATCH 13/16] ARM: vfp: add vfp_entry prototype Arnd Bergmann
2023-05-17 11:13 ` Ard Biesheuvel
2023-05-16 15:46 ` [PATCH 14/16] ARM: add missing syscall prototypes Arnd Bergmann
2023-05-16 15:46 ` Arnd Bergmann [this message]
2023-05-16 15:46 ` [PATCH 16/16] ARM: xip-kernel: add __inflate_kernel_data prototype Arnd Bergmann
2023-05-16 19:56 ` [PATCH 00/16] ARM: address -Wmissing-prototype warnings Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230516154605.517690-16-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=oleg@redhat.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).