* [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions
@ 2024-03-11 13:22 Max Kellermann
2024-03-11 13:22 ` [PATCH 02/11] arch/alpha/bugs: add missing SPDX header Max Kellermann
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:22 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
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.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index fb4efec7cbc7..5ba1400f3e4c 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -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
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 02/11] arch/alpha/bugs: add missing SPDX header
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
@ 2024-03-11 13:22 ` Max Kellermann
2024-03-11 13:22 ` [PATCH 03/11] arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes Max Kellermann
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:22 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/bugs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/bugs.c b/arch/alpha/kernel/bugs.c
index 08cc10d7fa17..6a16559c1a8f 100644
--- a/arch/alpha/kernel/bugs.c
+++ b/arch/alpha/kernel/bugs.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
#include <asm/hwrpb.h>
#include <linux/device.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 03/11] arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
2024-03-11 13:22 ` [PATCH 02/11] arch/alpha/bugs: add missing SPDX header Max Kellermann
@ 2024-03-11 13:22 ` Max Kellermann
2024-03-11 13:22 ` [PATCH 04/11] arch/alpha/io: add missing includes " Max Kellermann
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:22 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
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,
| ^~~~~~~~~~~~~~~~~
[...]
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/bugs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/bugs.c b/arch/alpha/kernel/bugs.c
index 6a16559c1a8f..d6ee9a30698d 100644
--- a/arch/alpha/kernel/bugs.c
+++ b/arch/alpha/kernel/bugs.c
@@ -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>
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 04/11] arch/alpha/io: add missing includes to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
2024-03-11 13:22 ` [PATCH 02/11] arch/alpha/bugs: add missing SPDX header Max Kellermann
2024-03-11 13:22 ` [PATCH 03/11] arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes Max Kellermann
@ 2024-03-11 13:22 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 05/11] arch/alpha/pci: make pcibios_claim_one_bus() static Max Kellermann
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:22 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
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)
| ^~~~~~~~~~~
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/io.c b/arch/alpha/kernel/io.c
index eda09778268f..fc5f7b80c7ea 100644
--- a/arch/alpha/kernel/io.c
+++ b/arch/alpha/kernel/io.c
@@ -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
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 05/11] arch/alpha/pci: make pcibios_claim_one_bus() static
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (2 preceding siblings ...)
2024-03-11 13:22 ` [PATCH 04/11] arch/alpha/io: add missing includes " Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 06/11] arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes Max Kellermann
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
This 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)
| ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 4458eb7f44f0..71495b1354eb 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -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;
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 06/11] arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (3 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 05/11] arch/alpha/pci: make pcibios_claim_one_bus() static Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 07/11] arch/alpha/perf_event: make init_hw_perf_events() static Max Kellermann
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
arch/alpha/kernel/irq.c:96:1: error: no previous prototype for 'handle_irq' [-Werror=missing-prototypes]
96 | handle_irq(int irq)
| ^~~~~~~~~~
[...]
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/irq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 15f2effd6baf..51c1c87ad8c4 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -11,6 +11,7 @@
* should be easier.
*/
+#include "irq_impl.h"
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 07/11] arch/alpha/perf_event: make init_hw_perf_events() static
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (4 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 06/11] arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 08/11] arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes Max Kellermann
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
This 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)
| ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c
index ccdb508c1516..1f0eb4f25c0f 100644
--- a/arch/alpha/kernel/perf_event.c
+++ b/arch/alpha/kernel/perf_event.c
@@ -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: ");
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 08/11] arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (5 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 07/11] arch/alpha/perf_event: make init_hw_perf_events() static Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 09/11] arch/alpha/fpreg: " Max Kellermann
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
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,
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/lib/checksum.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/alpha/lib/checksum.c b/arch/alpha/lib/checksum.c
index 3f35c3ed6948..66cad8354a44 100644
--- a/arch/alpha/lib/checksum.c
+++ b/arch/alpha/lib/checksum.c
@@ -10,6 +10,8 @@
* Rick Gorton <rick.gorton@alpha-processor.com>
*/
+#include <asm/checksum.h>
+
#include <linux/module.h>
#include <linux/string.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 09/11] arch/alpha/fpreg: add missing includes to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (6 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 08/11] arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 10/11] arch/alpha/smc37c669.: make SMC37c669_dump_registers() static Max Kellermann
2024-03-11 13:23 ` [PATCH 11/11] arch/alpha/smc37c669: add missing includes to fix -Wmissing-prototypes Max Kellermann
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
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)
| ^~~~~~~~~~~~~~~~~
[...]
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/lib/fpreg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/alpha/lib/fpreg.c b/arch/alpha/lib/fpreg.c
index 7c08b225261c..88e912689140 100644
--- a/arch/alpha/lib/fpreg.c
+++ b/arch/alpha/lib/fpreg.c
@@ -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)
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 10/11] arch/alpha/smc37c669.: make SMC37c669_dump_registers() static
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (7 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 09/11] arch/alpha/fpreg: " Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
2024-03-11 13:23 ` [PATCH 11/11] arch/alpha/smc37c669: add missing includes to fix -Wmissing-prototypes Max Kellermann
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
This 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.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/smc37c669.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c
index bbbd34586de0..ab22ade3dea3 100644
--- a/arch/alpha/kernel/smc37c669.c
+++ b/arch/alpha/kernel/smc37c669.c
@@ -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 =
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 11/11] arch/alpha/smc37c669: add missing includes to fix -Wmissing-prototypes
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
` (8 preceding siblings ...)
2024-03-11 13:23 ` [PATCH 10/11] arch/alpha/smc37c669.: make SMC37c669_dump_registers() static Max Kellermann
@ 2024-03-11 13:23 ` Max Kellermann
9 siblings, 0 replies; 11+ messages in thread
From: Max Kellermann @ 2024-03-11 13:23 UTC (permalink / raw)
To: richard.henderson, ink, mattst88, linux-alpha, linux-kernel
Cc: Max Kellermann
Fixes:
arch/alpha/kernel/smc37c669.c:2467:13: error: no previous prototype for 'SMC669_Init' [-Werror=missing-prototypes]
2467 | void __init SMC669_Init ( int index )
| ^~~~~~~~~~~
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
arch/alpha/kernel/smc37c669.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c
index ab22ade3dea3..be71ea825690 100644
--- a/arch/alpha/kernel/smc37c669.c
+++ b/arch/alpha/kernel/smc37c669.c
@@ -1,6 +1,9 @@
/*
* SMC 37C669 initialization code
*/
+
+#include "proto.h" // for the SMC669_Init() prototype
+
#include <linux/kernel.h>
#include <linux/mm.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-03-11 13:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
2024-03-11 13:22 ` [PATCH 02/11] arch/alpha/bugs: add missing SPDX header Max Kellermann
2024-03-11 13:22 ` [PATCH 03/11] arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:22 ` [PATCH 04/11] arch/alpha/io: add missing includes " Max Kellermann
2024-03-11 13:23 ` [PATCH 05/11] arch/alpha/pci: make pcibios_claim_one_bus() static Max Kellermann
2024-03-11 13:23 ` [PATCH 06/11] arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:23 ` [PATCH 07/11] arch/alpha/perf_event: make init_hw_perf_events() static Max Kellermann
2024-03-11 13:23 ` [PATCH 08/11] arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:23 ` [PATCH 09/11] arch/alpha/fpreg: " Max Kellermann
2024-03-11 13:23 ` [PATCH 10/11] arch/alpha/smc37c669.: make SMC37c669_dump_registers() static Max Kellermann
2024-03-11 13:23 ` [PATCH 11/11] arch/alpha/smc37c669: add missing includes to fix -Wmissing-prototypes Max Kellermann
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 read-only IMAP folder(s) and NNTP newsgroup(s).