Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: do not include ptrace.h from compat.h

including ptrace.h brings a definition of BITS_PER_PAGE into device
drivers and cause a build warning in allmodconfig builds:

drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
#define BITS_PER_PAGE (1UL << (PAGE_SHIFT + 3))

This uses a slightly different way to express current_pt_regs()
that avoids the use of the header and gets away with the already
included asm/ptrace.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Arnd Bergmann and committed by
Catalin Marinas
adc235af 1dccb598

+1 -2
+1 -2
arch/arm64/include/asm/compat.h
··· 23 23 */ 24 24 #include <linux/types.h> 25 25 #include <linux/sched.h> 26 - #include <linux/ptrace.h> 27 26 28 27 #define COMPAT_USER_HZ 100 29 28 #ifdef __AARCH64EB__ ··· 233 234 return (u32)(unsigned long)uptr; 234 235 } 235 236 236 - #define compat_user_stack_pointer() (user_stack_pointer(current_pt_regs())) 237 + #define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current))) 237 238 238 239 static inline void __user *arch_compat_alloc_user_space(long len) 239 240 {