linux-next: build failure after merge of the mm tree

From: Stephen Rothwell
Date: Sun Nov 26 2023 - 22:44:31 EST


Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig)
failed like this:

arch/sparc/vdso/vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes]
254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes]
307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vma.c:246:12: warning: no previous prototype for 'init_vdso_image' [-Wmissing-prototypes]
246 | int __init init_vdso_image(const struct vdso_image *image,
| ^~~~~~~~~~~~~~~
arch/sparc/prom/p1275.c:52:6: warning: no previous prototype for 'prom_cif_init' [-Wmissing-prototypes]
52 | void prom_cif_init(void *cif_handler, void *cif_stack)
| ^~~~~~~~~~~~~
In file included from arch/sparc/vdso/vdso32/vclock_gettime.c:22:
arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes]
254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes]
307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/prom/misc_64.c:165:5: warning: no previous prototype for 'prom_get_mmu_ihandle' [-Wmissing-prototypes]
165 | int prom_get_mmu_ihandle(void)
| ^~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/traps_64.c:253:6: error: no previous prototype for 'is_no_fault_exception' [-Werror=missing-prototypes]
253 | bool is_no_fault_exception(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/traps_64.c:2035:6: error: no previous prototype for 'do_mcd_err' [-Werror=missing-prototypes]
2035 | void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent)
| ^~~~~~~~~~
arch/sparc/kernel/traps_64.c:2153:6: error: no previous prototype for 'sun4v_nonresum_error_user_handled' [-Werror=missing-prototypes]
2153 | bool sun4v_nonresum_error_user_handled(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
arch/sparc/mm/init_64.c:2644:6: error: no previous prototype for 'vmemmap_free' [-Werror=missing-prototypes]
2644 | void vmemmap_free(unsigned long start, unsigned long end,
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally")

I applied the following hack for today.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 27 Nov 2023 14:18:45 +1100
Subject: [PATCH] sparc: turn off Werror for now

---
arch/sparc/kernel/Makefile | 2 +-
arch/sparc/mm/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 0984bb6f0f17..1ce4d5028c86 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -5,7 +5,7 @@
#

asflags-y := -ansi
-ccflags-y := -Werror
+#ccflags-y := -Werror

# Undefine sparc when processing vmlinux.lds - it is used
# And teach CPP we are doing $(BITS) builds (for this case)
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
index 871354aa3c00..a199484e131f 100644
--- a/arch/sparc/mm/Makefile
+++ b/arch/sparc/mm/Makefile
@@ -3,7 +3,7 @@
#

asflags-y := -ansi
-ccflags-y := -Werror
+#ccflags-y := -Werror

obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
obj-y += fault_$(BITS).o
--
2.40.1

After which I got these as well:

arch/sparc/kernel/adi_64.c:124:21: warning: no previous prototype for 'find_tag_store' [-Wmissing-prototypes]
124 | tag_storage_desc_t *find_tag_store(struct mm_struct *mm,
| ^~~~~~~~~~~~~~
arch/sparc/kernel/adi_64.c:156:21: warning: no previous prototype for 'alloc_tag_store' [-Wmissing-prototypes]
156 | tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
| ^~~~~~~~~~~~~~~
arch/sparc/kernel/adi_64.c:299:6: warning: no previous prototype for 'del_tag_store' [-Wmissing-prototypes]
299 | void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm)
| ^~~~~~~~~~~~~
arch/sparc/kernel/uprobes.c:237:17: warning: no previous prototype for 'uprobe_trap' [-Wmissing-prototypes]
237 | asmlinkage void uprobe_trap(struct pt_regs *regs,
| ^~~~~~~~~~~
arch/sparc/kernel/time_64.c:880:20: warning: no previous prototype for 'sched_clock' [-Wmissing-prototypes]
880 | unsigned long long sched_clock(void)
| ^~~~~~~~~~~
arch/sparc/kernel/pci_sun4v.c:259:15: warning: no previous prototype for 'dma_4v_iotsb_bind' [-Wmissing-prototypes]
259 | unsigned long dma_4v_iotsb_bind(unsigned long devhandle,
| ^~~~~~~~~~~~~~~~~
arch/sparc/kernel/setup_64.c:602:13: warning: no previous prototype for 'alloc_irqstack_bootmem' [-Wmissing-prototypes]
602 | void __init alloc_irqstack_bootmem(void)
| ^~~~~~~~~~~~~~~~~~~~~~

And these from the sparc (32) defconfig build:

arch/sparc/lib/cmpdi2.c:6:11: error: no previous prototype for '__cmpdi2' [-Werror=missing-prototypes]
6 | word_type __cmpdi2(long long a, long long b)
| ^~~~~~~~
cc1: all warnings being treated as errors
kernel/dma.c:70:5: warning: no previous prototype for 'request_dma' [-Wmissing-prototypes]
70 | int request_dma(unsigned int dmanr, const char * device_id)
| ^~~~~~~~~~~
kernel/dma.c:88:6: warning: no previous prototype for 'free_dma' [-Wmissing-prototypes]
88 | void free_dma(unsigned int dmanr)
| ^~~~~~~~

So I turned off -Werrror in the lib directory as well which added this:

arch/sparc/lib/ucmpdi2.c:5:11: warning: no previous prototype for '__ucmpdi2' [-Wmissing-prototypes]
5 | word_type __ucmpdi2(unsigned long long a, unsigned long long b)
| ^~~~~~~~~

--
Cheers,
Stephen Rothwell

Attachment: pgpeCutigZ6zi.pgp
Description: OpenPGP digital signature