Message ID | 20231127144418.54daad5d@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2832360vqx; Sun, 26 Nov 2023 19:44:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEC6JuvIVRKrgUyczYMcQe6p13YqHRVbIoeFGH8fVg9lLI6XEiOwoD9eGXHZemprxYBQ736 X-Received: by 2002:a05:6a20:7d8f:b0:18c:8ff1:f16 with SMTP id v15-20020a056a207d8f00b0018c8ff10f16mr2964853pzj.1.1701056676330; Sun, 26 Nov 2023 19:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701056676; cv=none; d=google.com; s=arc-20160816; b=tA/rnASdPNuJmHcan6Vx/+VBFnPHIfxo0PwCuYbOidIoF5jdxe67sx4IWEq/MzdcUX wjtJk1fp0GxBOoqNMfjAxim4SB3mzzbimj1ZDxM7VAm5gj8WwG6ntm9pEuCdsuSwoTwt f2EqHTiAmusoHWT6YfxPEVLd2JexlJUe+fojczMd4QKienCwwCB38x6Z3gmQ2TmMzJrv Mcn0/iQPRzx4m4HYyCZDzpDWHjTyCnMpX5n8c1cZZdBkQfJZ5C4tiY892j1z17bV9Sdp 3mVcebQEjxGP9AQr+RStZ+a+zAUNgV5V85inwgIEZRjIBVBjt8xRp1I35g2LOnudDip/ nDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=W6wPi/O+8MM/qw5hdejRqnpZ8FpJQUB6x4BDudn9Emo=; fh=D2h4ktC6nF/netB5lIh9ji1lVzbP0UQjXgEV4wEkrkE=; b=AF65y2swe4cdwnxA+hVl6c+09+uQ8GDvUAuIj/fY1JJRZAJZWsKbmBZ61kp4kUqcaz 6lSrwCtKqGhURA1PHEiELROZYbbSKQS36Lrp9MwwClTNHjh8R4v/XF1psNupkRDc2D5O AH4GFWRssyYdea8Rf3ZrjQupilqAu3ktZPn44840i32wuKRsEXhzan/MK6Re5xKOd0xY yWTrL9S5YZPcYNZG056MZ1OrkXo8pqwvbjJKiIUaQi3P3SegmvFYwF6Rk0UYIFYAHLFi khP0iZtitYt+5DlyZmoFHZJfzAEJqOoeR96Ei+O/jMrT/QouVqz/4QMNuayF5PjCQTCe pxMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=o2iEkiFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u5-20020a6540c5000000b0059f0cebd04csi8833302pgp.722.2023.11.26.19.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:44:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=o2iEkiFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7D3C28088A82; Sun, 26 Nov 2023 19:44:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229514AbjK0DoV (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Sun, 26 Nov 2023 22:44:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjK0DoT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 26 Nov 2023 22:44:19 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A11C2122; Sun, 26 Nov 2023 19:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1701056661; bh=W6wPi/O+8MM/qw5hdejRqnpZ8FpJQUB6x4BDudn9Emo=; h=Date:From:To:Cc:Subject:From; b=o2iEkiFpqZp9ED6zRKmy0/zOe4H5byuQsJhCvLvTaC7GKnbIpfaD19EVCCEBaJMU9 N39wtysnIQ1irdb0v2FOtyEveIhnTsTt2iMjEz1AwXg9WB31XO5XUOB4FttReSWeCB zOaMiXb2V1mlHUvojeenVRavMmly+PtWerhRQAsV6HOYWfpTzEkRT9lsLcAj1Arwos riiKYbnxlcGdMPxkw0V0vHTufFG7VgO7CaK68WYkkJd9WDKvf2fJo+LTWWYDWBc43C 8FrnnbdHHzg/9vsZd9n6MP6jwd7qbtA7B/pKjFsjV4OnFGXyf9L7zuT0eWac35Omk4 BluzjANKLss6w== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Sds0448RBz4wd1; Mon, 27 Nov 2023 14:44:20 +1100 (AEDT) Date: Mon, 27 Nov 2023 14:44:18 +1100 From: Stephen Rothwell <sfr@canb.auug.org.au> To: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org> Subject: linux-next: build failure after merge of the mm tree Message-ID: <20231127144418.54daad5d@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/MM5jk5QheGWqV9dqAb6GT+P"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 26 Nov 2023 19:44:30 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783682412460626818 X-GMAIL-MSGID: 1783687204940488014 |
Series |
linux-next: build failure after merge of the mm tree
|
|
Commit Message
Stephen Rothwell
Nov. 27, 2023, 3:44 a.m. UTC
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@canb.auug.org.au>
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(-)
Comments
Hi all, On Mon, 27 Nov 2023 14:44:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > 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@canb.auug.org.au> > 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) > | ^~~~~~~~~ Is anything being done about the above warnings?
On Fri, 22 Dec 2023 11:16:49 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > Hi all, > > On Mon, 27 Nov 2023 14:44:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > 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) > > > > ... > > > 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) > > | ^~~~~~~~~ > > Is anything being done about the above warnings? OK, here's sparc64. I'll do sparc32 in a bit. From: Andrew Morton <akpm@linux-foundation.org> Subject: sparc64: fix up fallout from enabling -Wmissing-prototypes Date: Thu Dec 21 04:33:25 PM PST 2023 Fix sparc64 allmodconfig build errors caused by enabling -Wmissing-prototypes. - Symbols only used from assembly were given local prototypes - A couple of missing inclusions were added - Define some functions to be static - vmemmap_free() is only needed if CONFIG_MEMORY_HOTPLUG - add new arch/sparc/include/asm/irq_work.h for arch_irq_work_raise() - move prom_cif_init() prototype to header, fix longstanding prom_cif_init() borkage. - various function declarations were moved from .c into shared .h Fixes: c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- arch/sparc/include/asm/floppy_64.h | 4 +++- arch/sparc/include/asm/irq_work.h | 10 ++++++++++ arch/sparc/include/asm/openprom.h | 2 ++ arch/sparc/kernel/adi_64.c | 6 +++--- arch/sparc/kernel/asm-offsets.c | 4 +++- arch/sparc/kernel/pci_sun4v.c | 2 +- arch/sparc/kernel/setup_64.c | 2 +- arch/sparc/kernel/time_64.c | 2 ++ arch/sparc/kernel/traps_64.c | 7 ++++--- arch/sparc/kernel/uprobes.c | 1 + arch/sparc/mm/init_64.c | 2 ++ arch/sparc/power/hibernate.c | 1 + arch/sparc/prom/init_64.c | 2 -- arch/sparc/prom/misc_64.c | 2 +- arch/sparc/prom/p1275.c | 2 +- arch/sparc/vdso/vclock_gettime.c | 10 ++++++++++ arch/sparc/vdso/vma.c | 2 +- drivers/mtd/maps/sun_uflash.c | 2 +- drivers/sbus/char/bbc_i2c.c | 3 --- drivers/sbus/char/bbc_i2c.h | 3 +++ 20 files changed, 50 insertions(+), 19 deletions(-) --- a/arch/sparc/vdso/vclock_gettime.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/vdso/vclock_gettime.c @@ -250,6 +250,8 @@ notrace static int do_monotonic_coarse(s return 0; } +int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts); + notrace int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) { @@ -278,6 +280,9 @@ int clock_gettime(clockid_t, struct __kernel_old_timespec *) __attribute__((weak, alias("__vdso_clock_gettime"))); +int +__vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts); + notrace int __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) { @@ -303,6 +308,8 @@ __vdso_clock_gettime_stick(clockid_t clo return vdso_fallback_gettime(clock, ts); } +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); + notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) { @@ -339,6 +346,9 @@ int gettimeofday(struct __kernel_old_timeval *, struct timezone *) __attribute__((weak, alias("__vdso_gettimeofday"))); +int +__vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz); + notrace int __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) { --- a/arch/sparc/kernel/asm-offsets.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/asm-offsets.c @@ -19,6 +19,7 @@ #include <asm/hibernate.h> #ifdef CONFIG_SPARC32 +int sparc32_foo(void); int sparc32_foo(void) { DEFINE(AOFF_thread_fork_kpsr, @@ -26,6 +27,7 @@ int sparc32_foo(void) return 0; } #else +int sparc64_foo(void); int sparc64_foo(void) { #ifdef CONFIG_HIBERNATION @@ -45,6 +47,7 @@ int sparc64_foo(void) } #endif +int foo(void); int foo(void) { BLANK(); @@ -57,4 +60,3 @@ int foo(void) /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ return 0; } - --- a/arch/sparc/prom/misc_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/prom/misc_64.c @@ -162,7 +162,7 @@ unsigned char prom_get_idprom(char *idbu return 0xff; } -int prom_get_mmu_ihandle(void) +static int prom_get_mmu_ihandle(void) { phandle node; int ret; --- a/arch/sparc/kernel/traps_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/traps_64.c @@ -22,6 +22,7 @@ #include <linux/kdebug.h> #include <linux/ftrace.h> #include <linux/reboot.h> +#include <linux/cpu.h> #include <linux/gfp.h> #include <linux/context_tracking.h> @@ -249,7 +250,7 @@ void sun4v_insn_access_exception_tl1(str sun4v_insn_access_exception(regs, addr, type_ctx); } -bool is_no_fault_exception(struct pt_regs *regs) +static bool is_no_fault_exception(struct pt_regs *regs) { unsigned char asi; u32 insn; @@ -2031,7 +2032,7 @@ static void sun4v_log_error(struct pt_re /* Handle memory corruption detected error which is vectored in * through resumable error trap. */ -void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent) +static void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent) { if (notify_die(DIE_TRAP, "MCD error", regs, 0, 0x34, SIGSEGV) == NOTIFY_STOP) @@ -2149,7 +2150,7 @@ static unsigned long sun4v_get_vaddr(str /* Attempt to handle non-resumable errors generated from userspace. * Returns true if the signal was handled, false otherwise. */ -bool sun4v_nonresum_error_user_handled(struct pt_regs *regs, +static bool sun4v_nonresum_error_user_handled(struct pt_regs *regs, struct sun4v_error_entry *ent) { unsigned int attrs = ent->err_attrs; --- a/arch/sparc/mm/init_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/mm/init_64.c @@ -2641,10 +2641,12 @@ int __meminit vmemmap_populate(unsigned return 0; } +#ifdef CONFIG_MEMORY_HOTPLUG void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) { } +#endif #endif /* CONFIG_SPARSEMEM_VMEMMAP */ /* These are actually filled in at boot time by sun4{u,v}_pgprot_init() */ --- a/arch/sparc/vdso/vma.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/vdso/vma.c @@ -243,7 +243,7 @@ static int stick_patch(const struct vdso * Allocate pages for the vdso and vvar, and copy in the vdso text from the * kernel image. */ -int __init init_vdso_image(const struct vdso_image *image, +static int __init init_vdso_image(const struct vdso_image *image, struct vm_special_mapping *vdso_mapping, bool elf64) { int cnpages = (image->size) / PAGE_SIZE; --- a/arch/sparc/kernel/setup_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/setup_64.c @@ -599,7 +599,7 @@ static void __init init_sparc64_elf_hwca pause_patch(); } -void __init alloc_irqstack_bootmem(void) +static void __init alloc_irqstack_bootmem(void) { unsigned int i, node; --- a/arch/sparc/kernel/time_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/time_64.c @@ -35,6 +35,8 @@ #include <linux/platform_device.h> #include <linux/ftrace.h> +#include <linux/sched/clock.h> + #include <asm/oplib.h> #include <asm/timer.h> #include <asm/irq.h> --- a/arch/sparc/power/hibernate.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/power/hibernate.c @@ -6,6 +6,7 @@ */ #include <linux/mm.h> +#include <linux/suspend.h> #include <asm/hibernate.h> #include <asm/visasm.h> --- a/arch/sparc/kernel/adi_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/adi_64.c @@ -121,7 +121,7 @@ adi_not_found: mdesc_release(hp); } -tag_storage_desc_t *find_tag_store(struct mm_struct *mm, +static tag_storage_desc_t *find_tag_store(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr) { @@ -153,7 +153,7 @@ tag_storage_desc_t *find_tag_store(struc return tag_desc; } -tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm, +static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr) { @@ -296,7 +296,7 @@ out: return tag_desc; } -void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm) +static void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm) { unsigned long flags; unsigned char *tags = NULL; --- /dev/null +++ a/arch/sparc/include/asm/irq_work.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __ASM_SPARC_IRQ_WORK_H +#define __ASM_SPARC_IRQ_WORK_H + +#include <asm-generic/irq_work.h> + +extern void arch_irq_work_raise(void); + +#endif /* __ASM_SPARC_IRQ_WORK_H */ --- a/arch/sparc/include/asm/floppy_64.h~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/include/asm/floppy_64.h @@ -197,6 +197,7 @@ static void sun_fd_enable_dma(void) pdma_areasize = pdma_size; } +irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie); irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie) { if (likely(doing_pdma)) { @@ -434,7 +435,8 @@ static int sun_pci_fd_eject(int drive) return -EINVAL; } -void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie) +static void +sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie) { floppy_interrupt(0, NULL); } --- a/arch/sparc/prom/init_64.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/prom/init_64.c @@ -27,8 +27,6 @@ phandle prom_chosen_node; * It gets passed the pointer to the PROM vector. */ -extern void prom_cif_init(void *); - void __init prom_init(void *cif_handler) { phandle node; --- a/arch/sparc/prom/p1275.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/prom/p1275.c @@ -49,7 +49,7 @@ void p1275_cmd_direct(unsigned long *arg local_irq_restore(flags); } -void prom_cif_init(void *cif_handler, void *cif_stack) +void prom_cif_init(void *cif_handler) { p1275buf.prom_cif_handler = (void (*)(long *))cif_handler; } --- a/arch/sparc/include/asm/openprom.h~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/include/asm/openprom.h @@ -275,6 +275,8 @@ struct linux_prom_pci_intmask { unsigned int interrupt; }; +extern void prom_cif_init(void *cif_handler); + #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC_OPENPROM_H) */ --- a/arch/sparc/kernel/pci_sun4v.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/pci_sun4v.c @@ -256,7 +256,7 @@ range_alloc_fail: return NULL; } -unsigned long dma_4v_iotsb_bind(unsigned long devhandle, +static unsigned long dma_4v_iotsb_bind(unsigned long devhandle, unsigned long iotsb_num, struct pci_bus *bus_dev) { --- a/arch/sparc/kernel/uprobes.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/arch/sparc/kernel/uprobes.c @@ -234,6 +234,7 @@ int arch_uprobe_post_xol(struct arch_upr /* Handler for uprobe traps. This is called from the traps table and * triggers the proper die notification. */ +void uprobe_trap(struct pt_regs *regs, unsigned long trap_level); asmlinkage void uprobe_trap(struct pt_regs *regs, unsigned long trap_level) { --- a/drivers/sbus/char/bbc_i2c.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/drivers/sbus/char/bbc_i2c.c @@ -358,9 +358,6 @@ fail: return NULL; } -extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); -extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); - static int bbc_i2c_probe(struct platform_device *op) { struct bbc_i2c_bus *bp; --- a/drivers/sbus/char/bbc_i2c.h~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/drivers/sbus/char/bbc_i2c.h @@ -82,4 +82,7 @@ extern int bbc_i2c_readb(struct bbc_i2c_ extern int bbc_i2c_write_buf(struct bbc_i2c_client *, char *buf, int len, int off); extern int bbc_i2c_read_buf(struct bbc_i2c_client *, char *buf, int len, int off); +extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); +extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); + #endif /* _BBC_I2C_H */ --- a/drivers/mtd/maps/sun_uflash.c~arch-sparc-fix-up-fallout-from-enabling-wmissing-prototypes +++ a/drivers/mtd/maps/sun_uflash.c @@ -47,7 +47,7 @@ struct map_info uflash_map_templ = { .bankwidth = UFLASH_BUSWIDTH, }; -int uflash_devinit(struct platform_device *op, struct device_node *dp) +static int uflash_devinit(struct platform_device *op, struct device_node *dp) { struct uflash_dev *up;
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