[01/24] compat: ARM64: always include asm-generic/compat.h

Message ID 20191211204306.1207817-2-arnd@arndb.de
State Superseded
Headers show
Series
  • block, scsi: final compat_ioctl cleanup
Related show

Commit Message

Arnd Bergmann Dec. 11, 2019, 8:42 p.m.
In order to use compat_* type defininitions in device drivers
outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h
ahead of the #ifdef.

All other architectures already do this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 arch/arm64/include/asm/compat.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.20.0

Comments

Will Deacon Dec. 12, 2019, 10:16 a.m. | #1
On Wed, Dec 11, 2019 at 09:42:35PM +0100, Arnd Bergmann wrote:
> In order to use compat_* type defininitions in device drivers

> outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h

> ahead of the #ifdef.

> 

> All other architectures already do this.

> 

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  arch/arm64/include/asm/compat.h | 5 +++--

>  1 file changed, 3 insertions(+), 2 deletions(-)


Acked-by: Will Deacon <will@kernel.org>


(Please let me know if you'd prefer this patch to be routed via the arm64
tree).

Will
Arnd Bergmann Dec. 12, 2019, 10:41 a.m. | #2
On Thu, Dec 12, 2019 at 11:17 AM Will Deacon <will@kernel.org> wrote:
>

> On Wed, Dec 11, 2019 at 09:42:35PM +0100, Arnd Bergmann wrote:

> > In order to use compat_* type defininitions in device drivers

> > outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h

> > ahead of the #ifdef.

> >

> > All other architectures already do this.

> >

> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> > ---

> >  arch/arm64/include/asm/compat.h | 5 +++--

> >  1 file changed, 3 insertions(+), 2 deletions(-)

>

> Acked-by: Will Deacon <will@kernel.org>


Thanks!

> (Please let me know if you'd prefer this patch to be routed via the arm64

> tree).


No, it needs to stay together with patch 02/24. The later patches in the
series are independent of those two though.

     Arnd

Patch

diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index b0d53a265f1d..7b4172ce497c 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -4,6 +4,9 @@ 
  */
 #ifndef __ASM_COMPAT_H
 #define __ASM_COMPAT_H
+
+#include <asm-generic/compat.h>
+
 #ifdef CONFIG_COMPAT
 
 /*
@@ -13,8 +16,6 @@ 
 #include <linux/sched.h>
 #include <linux/sched/task_stack.h>
 
-#include <asm-generic/compat.h>
-
 #define COMPAT_USER_HZ		100
 #ifdef __AARCH64EB__
 #define COMPAT_UTS_MACHINE	"armv8b\0\0"