arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions
Subsystems (2)
PATCH 1/11 arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions
There are no prototypes for functions which are only called by assembly code. Tell the compiler to disable those warnings in the relevant sources, just like arch/parisc/kernel/Makefile does.
--- arch/alpha/kernel/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/alpha/kernel/Makefile +8 -0
@@ -7,6 +7,14 @@ extra-y := vmlinux.lds asflags-y := $(KBUILD_CFLAGS) ccflags-y := -Wno-sign-compare +# no prototype warnings for functions which are only called by +# assembly code +CFLAGS_REMOVE_irq_alpha.o = -Wmissing-prototypes -Wmissing-declarations +CFLAGS_REMOVE_ptrace.o = -Wmissing-prototypes -Wmissing-declarations +CFLAGS_REMOVE_signal.o = -Wmissing-prototypes -Wmissing-declarations +CFLAGS_REMOVE_smp.o = -Wmissing-prototypes -Wmissing-declarations +CFLAGS_REMOVE_traps.o = -Wmissing-prototypes -Wmissing-declarations + obj-y := head.o entry.o traps.o process.o osf_sys.o irq.o \ irq_alpha.o signal.o setup.o ptrace.o time.o \ systbls.o err_common.o io.o bugs.o termios.o
Signature · 1 line
2.39.2
PATCH 2/11 arch/alpha/bugs: add missing SPDX header
--- arch/alpha/kernel/bugs.c | 1 + 1 file changed, 1 insertion(+)
arch/alpha/kernel/bugs.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <asm/hwrpb.h> #include <linux/device.h>
Signature · 1 line
2.39.2
PATCH 3/11 arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/kernel/bugs.c:19:9: error: no previous prototype for 'cpu_show_meltdown' [-Werror=missing-prototypes]
19 | ssize_t cpu_show_meltdown(struct device *dev,
| ^~~~~~~~~~~~~~~~~
[...]
--- arch/alpha/kernel/bugs.c | 1 + 1 file changed, 1 insertion(+)
arch/alpha/kernel/bugs.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 +#include <linux/cpu.h> // prototypes for functions defined here #include <asm/hwrpb.h> #include <linux/device.h>
Signature · 1 line
2.39.2
PATCH 4/11 arch/alpha/io: add missing includes to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/kernel/io.c:654:1: error: no previous prototype for 'scr_memcpyw' [-Werror=missing-prototypes]
654 | scr_memcpyw(u16 *d, const u16 *s, unsigned int count)
| ^~~~~~~~~~~
--- arch/alpha/kernel/io.c | 1 + 1 file changed, 1 insertion(+)
arch/alpha/kernel/io.c +1 -0
@@ -8,6 +8,7 @@#include <linux/string.h> #include <linux/module.h> #include <asm/io.h> +#include <asm/vga.h> // for the scr_memcpyw() prototype /* Out-of-line versions of the i/o routines that redirect into the platform-specific version. Note that "platform-specific" may mean
Signature · 1 line
2.39.2
PATCH 5/11 arch/alpha/pci: make pcibios_claim_one_bus() static
In reply to Max KellermannThis function is only used within this source file. Fixes -Wmissing-prototypes:
arch/alpha/kernel/pci.c:285:1: error: no previous prototype for 'pcibios_claim_one_bus' [-Werror=missing-prototypes]
285 | pcibios_claim_one_bus(struct pci_bus *b)
| ^~~~~~~~~~~~~~~~~~~~~
--- arch/alpha/kernel/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/pci.c +1 -1
@@ -281,7 +281,7 @@ pcibios_set_master(struct pci_dev *dev)pci_write_config_byte (dev,PCI_LATENCY_TIMER ,64 ); } -void __init +static void __init pcibios_claim_one_bus (struct pci_bus *b) {struct pci_dev *dev;
Signature · 1 line
2.39.2
PATCH 6/11 arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/kernel/irq.c:96:1: error: no previous prototype for 'handle_irq' [-Werror=missing-prototypes]
96 | handle_irq(int irq)
| ^~~~~~~~~~
[...]
--- arch/alpha/kernel/irq.c | 1 + 1 file changed, 1 insertion(+)
arch/alpha/kernel/irq.c +1 -0
@@ -11,6 +11,7 @@* should be easier. */ +#include "irq_impl.h" #include <linux/kernel.h> #include <linux/module.h> #include <linux/errno.h>
Signature · 1 line
2.39.2
PATCH 7/11 arch/alpha/perf_event: make init_hw_perf_events() static
In reply to Max KellermannThis function is only used within this source file. Fixes -Wmissing-prototypes:
arch/alpha/kernel/perf_event.c:873:12: error: no previous prototype for 'init_hw_perf_events' [-Werror=missing-prototypes]
873 | int __init init_hw_perf_events(void)
| ^~~~~~~~~~~~~~~~~~~
--- arch/alpha/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/perf_event.c +1 -1
@@ -870,7 +870,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,/* * Init call to initialise performance events at kernel startup. */ -int __init init_hw_perf_events (void ) +static int __init init_hw_perf_events (void ) {pr_info ("Performance events: " );
Signature · 1 line
2.39.2
PATCH 8/11 arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/lib/checksum.c:45:9: error: no previous prototype for 'csum_tcpudp_magic' [-Werror=missing-prototypes]
45 | __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
| ^~~~~~~~~~~~~~~~~--- arch/alpha/lib/checksum.c | 2 ++ 1 file changed, 2 insertions(+)
arch/alpha/lib/checksum.c +2 -0
@@ -10,6 +10,8 @@* Rick Gorton <[email protected]> */ +#include <asm/checksum.h> +#include <linux/module.h> #include <linux/string.h>
Signature · 1 line
2.39.2
PATCH 9/11 arch/alpha/fpreg: add missing includes to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/lib/fpreg.c:20:1: error: no previous prototype for 'alpha_read_fp_reg' [-Werror=missing-prototypes]
20 | alpha_read_fp_reg (unsigned long reg)
| ^~~~~~~~~~~~~~~~~
[...]
--- arch/alpha/lib/fpreg.c | 3 +++ 1 file changed, 3 insertions(+)
arch/alpha/lib/fpreg.c +3 -0
@@ -5,9 +5,12 @@* (C) Copyright 1998 Linus Torvalds */ +#include "../kernel/proto.h" +#include <linux/compiler.h> #include <linux/export.h> #include <linux/preempt.h> +#include <asm/fpu.h> #include <asm/thread_info.h> #if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )
Signature · 1 line
2.39.2
PATCH 10/11 arch/alpha/smc37c669.: make SMC37c669_dump_registers() static
In reply to Max KellermannThis function is only used within this source file. Fixes -Wmissing-prototypes:
arch/alpha/kernel/smc37c669.c:2434:1: error: no previous prototype for 'SMC37c669_dump_registers' [-Werror=missing-prototypes]
2434 | SMC37c669_dump_registers(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
Also add #if SMC_DEBUG because it's only ever used under this condition.
--- arch/alpha/kernel/smc37c669.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/alpha/kernel/smc37c669.c +4 -1
@@ -2430,13 +2430,16 @@ int __init smcc669_write( struct FILE *fp, int size, int number, unsigned char * }#endif -void __init +#if SMC_DEBUG +static void __init SMC37c669_dump_registers (void ) {int i;for (i =0 ; i <=0x29 ; i++)printk ("-- CR%02x : %02x\n" , i,SMC37c669_read_config (i)); } +#endif // SMC_DEBUG +/*+ * ============================================================================ * = SMC_init - SMC37c669 Super I/O controller initialization =
Signature · 1 line
2.39.2
PATCH 11/11 arch/alpha/smc37c669: add missing includes to fix -Wmissing-prototypes
In reply to Max KellermannFixes:
arch/alpha/kernel/smc37c669.c:2467:13: error: no previous prototype for 'SMC669_Init' [-Werror=missing-prototypes]
2467 | void __init SMC669_Init ( int index )
| ^~~~~~~~~~~
--- arch/alpha/kernel/smc37c669.c | 3 +++ 1 file changed, 3 insertions(+)
arch/alpha/kernel/smc37c669.c +3 -0
@@ -1,6 +1,9 @@/* * SMC 37C669 initialization code */ + +#include "proto.h" // for the SMC669_Init() prototype +#include <linux/kernel.h> #include <linux/mm.h>
Signature · 1 line
2.39.2