Skip to content

Commit

Permalink
sparc64: fix sparse warnings in compat_audit.c
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sravnborg authored and davem330 committed May 19, 2014
1 parent 59dec13 commit a1ca187
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/sparc/kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/kernel/compat_audit.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define __32bit_syscall_numbers__
#include <asm/unistd.h>
#include "kernel.h"

unsigned sparc32_dir_class[] = {
#include <asm-generic/audit_dir_write.h>
Expand Down
7 changes: 7 additions & 0 deletions arch/sparc/kernel/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1ca187

Please sign in to comment.