[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mhng-eb6e6d97-fe40-4755-9be5-eb75a690d88c@palmer-ri-x1c9a>
Date: Thu, 22 Jun 2023 08:02:09 -0700 (PDT)
From: Palmer Dabbelt <palmer@...belt.com>
To: arnd@...nel.org
CC: akpm@...ux-foundation.org, linux-mm@...ck.org,
Arnd Bergmann <arnd@...db.de>, linux@...linux.org.uk,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, monstr@...str.eu,
tsbogend@...ha.franken.de, deller@....de, mpe@...erman.id.au,
hca@...ux.ibm.com, tglx@...utronix.de, mingo@...hat.com,
x86@...nel.org, rafael@...nel.org, paul@...l-moore.com,
eparis@...hat.com, dennis@...nel.org, tj@...nel.org, cl@...ux.com,
pavel@....cz, peterz@...radead.org, longman@...hat.com,
boqun.feng@...il.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, audit@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com
Subject: Re: [PATCH 11/14] init: consolidate prototypes in linux/init.h
On Wed, 17 May 2023 06:10:59 PDT (-0700), arnd@...nel.org wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The init/main.c file contains some extern declarations for functions
> defined in architecture code, and it defines some other functions that
> are called from architecture code with a custom prototype. Both of those
> result in warnings with 'make W=1':
>
> init/calibrate.c:261:37: error: no previous prototype for 'calibrate_delay_is_known' [-Werror=missing-prototypes]
> init/main.c:790:20: error: no previous prototype for 'mem_encrypt_init' [-Werror=missing-prototypes]
> init/main.c:792:20: error: no previous prototype for 'poking_init' [-Werror=missing-prototypes]
> arch/arm64/kernel/irq.c:122:13: error: no previous prototype for 'init_IRQ' [-Werror=missing-prototypes]
> arch/arm64/kernel/time.c:55:13: error: no previous prototype for 'time_init' [-Werror=missing-prototypes]
> arch/x86/kernel/process.c:935:13: error: no previous prototype for 'arch_post_acpi_subsys_init' [-Werror=missing-prototypes]
> init/calibrate.c:261:37: error: no previous prototype for 'calibrate_delay_is_known' [-Werror=missing-prototypes]
> kernel/fork.c:991:20: error: no previous prototype for 'arch_task_cache_init' [-Werror=missing-prototypes]
>
> Add prototypes for all of these in include/linux/init.h or another
> appropriate header, and remove the duplicate declarations from
> architecture specific code.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> arch/arm/include/asm/irq.h | 1 -
> arch/microblaze/include/asm/setup.h | 2 --
> arch/mips/include/asm/irq.h | 1 -
> arch/parisc/kernel/smp.c | 1 -
> arch/powerpc/include/asm/irq.h | 1 -
> arch/riscv/include/asm/irq.h | 2 --
> arch/riscv/include/asm/timex.h | 2 --
> arch/s390/kernel/entry.h | 2 --
> arch/sh/include/asm/irq.h | 1 -
> arch/sh/include/asm/rtc.h | 2 --
> arch/sparc/include/asm/irq_32.h | 1 -
> arch/sparc/include/asm/irq_64.h | 1 -
> arch/sparc/include/asm/timer_64.h | 1 -
> arch/sparc/kernel/kernel.h | 4 ----
> arch/x86/include/asm/irq.h | 2 --
> arch/x86/include/asm/mem_encrypt.h | 3 ---
> arch/x86/include/asm/time.h | 1 -
> arch/x86/include/asm/tsc.h | 1 -
> include/linux/acpi.h | 3 ++-
> include/linux/delay.h | 1 +
> include/linux/init.h | 20 ++++++++++++++++++++
> init/main.c | 18 ------------------
> 22 files changed, 23 insertions(+), 48 deletions(-)
...
> diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h
> index 43b9ebfbd943..8e10a94430a2 100644
> --- a/arch/riscv/include/asm/irq.h
> +++ b/arch/riscv/include/asm/irq.h
> @@ -16,6 +16,4 @@ void riscv_set_intc_hwnode_fn(struct fwnode_handle *(*fn)(void));
>
> struct fwnode_handle *riscv_get_intc_hwnode(void);
>
> -extern void __init init_IRQ(void);
> -
> #endif /* _ASM_RISCV_IRQ_H */
> diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
> index d6a7428f6248..a06697846e69 100644
> --- a/arch/riscv/include/asm/timex.h
> +++ b/arch/riscv/include/asm/timex.h
> @@ -88,6 +88,4 @@ static inline int read_current_timer(unsigned long *timer_val)
> return 0;
> }
>
> -extern void time_init(void);
> -
> #endif /* _ASM_RISCV_TIMEX_H */
Reviewed-by: Palmer Dabbelt <palmer@...osinc.com> # RISC-V
Acked-by: Palmer Dabbelt <palmer@...osinc.com> # RISC-V
Thanks!
Powered by blists - more mailing lists