Skip to content

Commit 7d653ad

Browse files
committed
parisc: Fold 32-bit compat code into audit_classify_syscall()
No need to keep an extra 32-bit audit_classify_syscall() function. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 226b8ab commit 7d653ad

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

arch/parisc/kernel/audit.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ int audit_classify_arch(int arch)
4040

4141
int audit_classify_syscall(int abi, unsigned syscall)
4242
{
43-
#ifdef CONFIG_COMPAT
44-
extern int parisc32_classify_syscall(unsigned);
45-
if (abi == AUDIT_ARCH_PARISC)
46-
return parisc32_classify_syscall(syscall);
47-
#endif
4843
switch (syscall) {
4944
case __NR_open:
5045
return AUDITSC_OPEN;
@@ -55,6 +50,10 @@ int audit_classify_syscall(int abi, unsigned syscall)
5550
case __NR_openat2:
5651
return AUDITSC_OPENAT2;
5752
default:
53+
#ifdef CONFIG_COMPAT
54+
if (abi == AUDIT_ARCH_PARISC)
55+
return AUDITSC_COMPAT;
56+
#endif
5857
return AUDITSC_NATIVE;
5958
}
6059
}

arch/parisc/kernel/compat_audit.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,3 @@ unsigned int parisc32_signal_class[] = {
2626
#include <asm-generic/audit_signal.h>
2727
~0U
2828
};
29-
30-
int parisc32_classify_syscall(unsigned syscall)
31-
{
32-
switch (syscall) {
33-
case __NR_open:
34-
return AUDITSC_OPEN;
35-
case __NR_openat:
36-
return AUDITSC_OPENAT;
37-
case __NR_execve:
38-
return AUDITSC_EXECVE;
39-
case __NR_openat2:
40-
return AUDITSC_OPENAT2;
41-
default:
42-
return AUDITSC_COMPAT;
43-
}
44-
}

0 commit comments

Comments
 (0)