Skip to content

Commit 0e5e3d4

Browse files
Benjamin Thielsuryasaimadhu
authored andcommitted
x86/audit: Fix a -Wmissing-prototypes warning for ia32_classify_syscall()
Lift the prototype of ia32_classify_syscall() into its own header. Signed-off-by: Benjamin Thiel <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 6255c16 commit 0e5e3d4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

arch/x86/ia32/audit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <asm/unistd_32.h>
3+
#include <asm/audit.h>
34

45
unsigned ia32_dir_class[] = {
56
#include <asm-generic/audit_dir_write.h>

arch/x86/include/asm/audit.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_X86_AUDIT_H
3+
#define _ASM_X86_AUDIT_H
4+
5+
int ia32_classify_syscall(unsigned int syscall);
6+
7+
#endif /* _ASM_X86_AUDIT_H */

arch/x86/kernel/audit_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/types.h>
44
#include <linux/audit.h>
55
#include <asm/unistd.h>
6+
#include <asm/audit.h>
67

78
static unsigned dir_class[] = {
89
#include <asm-generic/audit_dir_write.h>
@@ -41,7 +42,6 @@ int audit_classify_arch(int arch)
4142
int audit_classify_syscall(int abi, unsigned syscall)
4243
{
4344
#ifdef CONFIG_IA32_EMULATION
44-
extern int ia32_classify_syscall(unsigned);
4545
if (abi == AUDIT_ARCH_I386)
4646
return ia32_classify_syscall(syscall);
4747
#endif

0 commit comments

Comments
 (0)