Re: [PATCH v2 26/35] powerpc/64: system call: Fix sparse warning about missing declaration

From: Christophe Leroy
Date: Wed Nov 27 2019 - 02:30:56 EST




Le 26/11/2019 Ã 22:44, Luc Van Oostenryck a ÃcritÂ:
On Tue, Nov 26, 2019 at 09:13:40PM +0100, Michal Suchanek wrote:
Sparse warns about missing declarations for these functions:

+arch/powerpc/kernel/syscall_64.c:108:23: warning: symbol 'syscall_exit_prepare' was not declared. Should it be static?
+arch/powerpc/kernel/syscall_64.c:18:6: warning: symbol 'system_call_exception' was not declared. Should it be static?
+arch/powerpc/kernel/syscall_64.c:200:23: warning: symbol 'interrupt_exit_user_prepare' was not declared. Should it be static?
+arch/powerpc/kernel/syscall_64.c:288:23: warning: symbol 'interrupt_exit_kernel_prepare' was not declared. Should it be static?

Add declaration for them.

I'm fine with this patch but, just FYI, lately people seems to
prefer to add '__visible' to the function definition instead
of creating such header files.

AFAIU, that's not exactly the purpose of '__visible', see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9add850c2

Christophe