Skip to content

Commit 1c1e436

Browse files
committed
UAPI: Split compound conditionals containing __KERNEL__ in Arm64
Split compound conditionals containing __KERNEL__ in Arm64 where possible to make it easier for the UAPI disintegration scripts to handle them. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 8901395 commit 1c1e436

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎arch/arm64/include/asm/hwcap.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
#define COMPAT_HWCAP_IDIVT (1 << 18)
3636
#define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT)
3737

38-
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
38+
#ifdef __KERNEL__
39+
#ifndef __ASSEMBLY__
3940
/*
4041
* This yields a mask that user programs can use to figure out what
4142
* instruction set this cpu supports.
@@ -49,5 +50,6 @@
4950

5051
extern unsigned int elf_hwcap;
5152
#endif
53+
#endif
5254

5355
#endif

‎arch/arm64/include/asm/stat.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
#include <asm-generic/stat.h>
2020

21-
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
21+
#ifdef __KERNEL__
22+
#ifdef CONFIG_COMPAT
2223

2324
#include <asm/compat.h>
2425

@@ -57,6 +58,7 @@ struct stat64 {
5758
compat_u64 st_ino;
5859
};
5960

61+
#endif
6062
#endif
6163

6264
#endif

‎arch/arm64/include/asm/unistd.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <asm-generic/unistd.h>
1919
#endif
2020

21-
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
21+
#ifdef __KERNEL__
22+
#ifdef CONFIG_COMPAT
2223
#include <asm/unistd32.h>
2324
#endif
25+
#endif

0 commit comments

Comments
 (0)