diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-05-16 17:26:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-18 22:01:34 -0400 |
commit | a1ca187e7dd73b7aa8fffe70b6d04d38361df208 (patch) | |
tree | bb722ca5b67ac38322c1e57b592036ab39398741 | |
parent | 59dec13b2736117c35e2432fc6e241263f7b4a9b (diff) |
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/audit.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/compat_audit.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/kernel.h | 7 |
3 files changed, 10 insertions, 6 deletions
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 @@ | |||
3 | #include <linux/audit.h> | 3 | #include <linux/audit.h> |
4 | #include <asm/unistd.h> | 4 | #include <asm/unistd.h> |
5 | 5 | ||
6 | #include "kernel.h" | ||
7 | |||
6 | static unsigned dir_class[] = { | 8 | static unsigned dir_class[] = { |
7 | #include <asm-generic/audit_dir_write.h> | 9 | #include <asm-generic/audit_dir_write.h> |
8 | ~0U | 10 | ~0U |
@@ -40,7 +42,6 @@ int audit_classify_arch(int arch) | |||
40 | int audit_classify_syscall(int abi, unsigned syscall) | 42 | int audit_classify_syscall(int abi, unsigned syscall) |
41 | { | 43 | { |
42 | #ifdef CONFIG_COMPAT | 44 | #ifdef CONFIG_COMPAT |
43 | extern int sparc32_classify_syscall(unsigned); | ||
44 | if (abi == AUDIT_ARCH_SPARC) | 45 | if (abi == AUDIT_ARCH_SPARC) |
45 | return sparc32_classify_syscall(syscall); | 46 | return sparc32_classify_syscall(syscall); |
46 | #endif | 47 | #endif |
@@ -61,11 +62,6 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
61 | static int __init audit_classes_init(void) | 62 | static int __init audit_classes_init(void) |
62 | { | 63 | { |
63 | #ifdef CONFIG_COMPAT | 64 | #ifdef CONFIG_COMPAT |
64 | extern __u32 sparc32_dir_class[]; | ||
65 | extern __u32 sparc32_write_class[]; | ||
66 | extern __u32 sparc32_read_class[]; | ||
67 | extern __u32 sparc32_chattr_class[]; | ||
68 | extern __u32 sparc32_signal_class[]; | ||
69 | audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); | 65 | audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); |
70 | audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); | 66 | audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); |
71 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); | 67 | 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 @@ | |||
1 | #define __32bit_syscall_numbers__ | 1 | #define __32bit_syscall_numbers__ |
2 | #include <asm/unistd.h> | 2 | #include <asm/unistd.h> |
3 | #include "kernel.h" | ||
3 | 4 | ||
4 | unsigned sparc32_dir_class[] = { | 5 | unsigned sparc32_dir_class[] = { |
5 | #include <asm-generic/audit_dir_write.h> | 6 | #include <asm-generic/audit_dir_write.h> |
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); | |||
50 | void do_signal32(struct pt_regs * regs); | 50 | void do_signal32(struct pt_regs * regs); |
51 | asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); | 51 | asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); |
52 | 52 | ||
53 | /* compat_audit.c */ | ||
54 | extern unsigned sparc32_dir_class[]; | ||
55 | extern unsigned sparc32_chattr_class[]; | ||
56 | extern unsigned sparc32_write_class[]; | ||
57 | extern unsigned sparc32_read_class[]; | ||
58 | extern unsigned sparc32_signal_class[]; | ||
59 | int sparc32_classify_syscall(unsigned syscall); | ||
53 | #endif | 60 | #endif |
54 | 61 | ||
55 | #ifdef CONFIG_SPARC32 | 62 | #ifdef CONFIG_SPARC32 |