From a1ca187e7dd73b7aa8fffe70b6d04d38361df208 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Fri, 16 May 2014 23:26:08 +0200 Subject: sparc64: fix sparse warnings in compat_audit.c Fix following warnings: compat_audit.c:4:10: warning: symbol 'sparc32_dir_class' was not declared. Should it be static? compat_audit.c:9:10: warning: symbol 'sparc32_chattr_class' was not declared. Should it be static? compat_audit.c:14:10: warning: symbol 'sparc32_write_class' was not declared. Should it be static? compat_audit.c:19:10: warning: symbol 'sparc32_read_class' was not declared. Should it be static? compat_audit.c:24:10: warning: symbol 'sparc32_signal_class' was not declared. Should it be static? compat_audit.c:29:5: warning: symbol 'sparc32_classify_syscall' was not declared. Should it be static? Add declarations to kernel.h Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- arch/sparc/kernel/audit.c | 8 ++------ arch/sparc/kernel/compat_audit.c | 1 + arch/sparc/kernel/kernel.h | 7 +++++++ 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/sparc/kernel/audit.c b/arch/sparc/kernel/audit.c index 8fff0ac63d56..24361b494a93 100644 --- a/arch/sparc/kernel/audit.c +++ b/arch/sparc/kernel/audit.c @@ -3,6 +3,8 @@ #include #include +#include "kernel.h" + static unsigned dir_class[] = { #include ~0U @@ -40,7 +42,6 @@ int audit_classify_arch(int arch) int audit_classify_syscall(int abi, unsigned syscall) { #ifdef CONFIG_COMPAT - extern int sparc32_classify_syscall(unsigned); if (abi == AUDIT_ARCH_SPARC) return sparc32_classify_syscall(syscall); #endif @@ -61,11 +62,6 @@ int audit_classify_syscall(int abi, unsigned syscall) static int __init audit_classes_init(void) { #ifdef CONFIG_COMPAT - extern __u32 sparc32_dir_class[]; - extern __u32 sparc32_write_class[]; - extern __u32 sparc32_read_class[]; - extern __u32 sparc32_chattr_class[]; - extern __u32 sparc32_signal_class[]; audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); diff --git a/arch/sparc/kernel/compat_audit.c b/arch/sparc/kernel/compat_audit.c index d865575b25bf..7062263d09c1 100644 --- a/arch/sparc/kernel/compat_audit.c +++ b/arch/sparc/kernel/compat_audit.c @@ -1,5 +1,6 @@ #define __32bit_syscall_numbers__ #include +#include "kernel.h" unsigned sparc32_dir_class[] = { #include diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 980e21d47a82..802137266b02 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h @@ -50,6 +50,13 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs); void do_signal32(struct pt_regs * regs); asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); +/* compat_audit.c */ +extern unsigned sparc32_dir_class[]; +extern unsigned sparc32_chattr_class[]; +extern unsigned sparc32_write_class[]; +extern unsigned sparc32_read_class[]; +extern unsigned sparc32_signal_class[]; +int sparc32_classify_syscall(unsigned syscall); #endif #ifdef CONFIG_SPARC32 -- cgit v1.2.3