linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: arnd@kernel.org
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	Arnd Bergmann <arnd@arndb.de>,
	linux@armlinux.org.uk, Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	monstr@monstr.eu, tsbogend@alpha.franken.de, deller@gmx.de,
	mpe@ellerman.id.au, hca@linux.ibm.com, tglx@linutronix.de,
	mingo@redhat.com, x86@kernel.org, rafael@kernel.org,
	paul@paul-moore.com, eparis@redhat.com, dennis@kernel.org,
	tj@kernel.org, cl@linux.com, pavel@ucw.cz, peterz@infradead.org,
	longman@redhat.com, boqun.feng@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
	linux-sh@vger.kernel.org, audit@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com
Subject: Re: [PATCH 11/14] init: consolidate prototypes in linux/init.h
Date: Thu, 22 Jun 2023 08:02:09 -0700 (PDT)	[thread overview]
Message-ID: <mhng-eb6e6d97-fe40-4755-9be5-eb75a690d88c@palmer-ri-x1c9a> (raw)
In-Reply-To: <20230517131102.934196-12-arnd@kernel.org>

On Wed, 17 May 2023 06:10:59 PDT (-0700), arnd@kernel.org wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.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@rivosinc.com> # RISC-V
Acked-by: Palmer Dabbelt <palmer@rivosinc.com> # RISC-V

Thanks!



  reply	other threads:[~2023-06-22 15:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 13:10 [PATCH 00/14] mm/init/kernel: missing-prototypes warnings Arnd Bergmann
2023-05-17 13:10 ` [PATCH 01/14] mm: percpu: unhide pcpu_embed_first_chunk prototype Arnd Bergmann
2023-05-17 13:10 ` [PATCH 02/14] mm: page_poison: always declare __kernel_map_pages() function Arnd Bergmann
2023-05-17 13:10 ` [PATCH 03/14] mm: sparse: mark populate_section_memmap() static Arnd Bergmann
2023-05-17 13:10 ` [PATCH 04/14] audit: avoid missing-prototype warnings Arnd Bergmann
2023-05-17 14:33   ` [PATCH 4/14] " Paul Moore
2023-05-17 14:51     ` Arnd Bergmann
2023-05-17 15:51       ` Paul Moore
2023-05-17 13:10 ` [PATCH 05/14] lib: devmem_is_allowed: include linux/io.h Arnd Bergmann
2023-05-17 13:10 ` [PATCH 06/14] locking: add lockevent_read() prototype Arnd Bergmann
2023-05-17 13:10 ` [PATCH 07/14] panic: hide unused global functions Arnd Bergmann
2023-05-17 13:10 ` [PATCH 08/14] panic: make function declarations visible Arnd Bergmann
2023-05-17 13:10 ` [PATCH 09/14] kunit: include debugfs header file Arnd Bergmann
2023-05-18  3:54   ` David Gow
2023-05-17 13:10 ` [PATCH 10/14] suspend: add a arch_resume_nosmt() prototype Arnd Bergmann
2023-05-17 13:48   ` Rafael J. Wysocki
2023-05-17 14:52     ` Arnd Bergmann
2023-05-24 17:33       ` Rafael J. Wysocki
2023-05-17 13:10 ` [PATCH 11/14] init: consolidate prototypes in linux/init.h Arnd Bergmann
2023-06-22 15:02   ` Palmer Dabbelt [this message]
2023-05-17 13:11 ` [PATCH 12/14] init: move cifs_root_data() prototype into linux/mount.h Arnd Bergmann
2023-05-17 13:11 ` [PATCH 13/14] thread_info: move function declarations to linux/thread_info.h Arnd Bergmann
2023-05-24 18:48   ` Catalin Marinas
2023-05-17 13:11 ` [PATCH 14/14] time_namespace: always provide arch_get_vdso_data() prototype for vdso Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-eb6e6d97-fe40-4755-9be5-eb75a690d88c@palmer-ri-x1c9a \
    --to=palmer@dabbelt.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=audit@vger.kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=deller@gmx.de \
    --cc=dennis@kernel.org \
    --cc=eparis@redhat.com \
    --cc=hca@linux.ibm.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=paul@paul-moore.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).