Commit a1ca187e authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller

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: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59dec13b
......@@ -3,6 +3,8 @@
#include <linux/audit.h>
#include <asm/unistd.h>
#include "kernel.h"
static unsigned dir_class[] = {
#include <asm-generic/audit_dir_write.h>
~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);
......
#define __32bit_syscall_numbers__
#include <asm/unistd.h>
#include "kernel.h"
unsigned sparc32_dir_class[] = {
#include <asm-generic/audit_dir_write.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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment