in_32bit_compat_syscall() + is_32bit_compat_task() were originally named to be consistent with is_32bit_compat_thread() from asm/compat.h in the commit ("arch: add compat helpers specific to 32-bit").
Defined in linux/compat.h, in_32bit_compat_syscall() doesn't necessarily have to follow the same pattern. in_compat32_syscall() is shorter, matches the config option CONFIG_COMPAT32, and is generally more consistent with the common name/way 32-bit compat is referred to.
Rename in_32bit_compat_syscall() to in_compat32_syscall().
Signed-off-by: Zachary Leaf zachary.leaf@arm.com Cc: Kristina Martsenko kristina.martsenko@arm.com --- arch/sparc/include/asm/compat.h | 2 +- arch/x86/include/asm/compat.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- drivers/input/input.c | 2 +- fs/ext4/dir.c | 2 +- fs/nfs/dir.c | 2 +- include/linux/compat.h | 8 ++++---- kernel/time/time.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h index 1d2e5ad1c894..3816422c817a 100644 --- a/arch/sparc/include/asm/compat.h +++ b/arch/sparc/include/asm/compat.h @@ -156,7 +156,7 @@ static inline bool in_compat_syscall(void) return pt_regs_trap_type(current_pt_regs()) == 0x110; } #define in_compat_syscall in_compat_syscall -#define in_32bit_compat_syscall in_compat_syscall +#define in_compat32_syscall in_compat_syscall #endif
#endif /* _ASM_SPARC64_COMPAT_H */ diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 2f7facbb592c..5dcb9afbcb9c 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@ -100,7 +100,7 @@ static inline bool in_compat_syscall(void) return in_32bit_syscall(); } #define in_compat_syscall in_compat_syscall /* override the generic impl */ -#define in_32bit_compat_syscall in_compat_syscall +#define in_compat32_syscall in_compat_syscall #define compat_need_64bit_alignment_fixup in_ia32_syscall #endif
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 57bbf4a4ee2d..d1fd4eec97f7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -132,7 +132,7 @@ static int kfd_open(struct inode *inode, struct file *filep) if (iminor(inode) != 0) return -ENODEV;
- is_32bit_user_mode = in_32bit_compat_syscall(); + is_32bit_user_mode = in_compat32_syscall();
if (is_32bit_user_mode) { dev_warn(kfd_device, diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 5a037594450d..210bb5c9e876 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -1427,7 +1427,7 @@ static struct kfd_process *create_process(const struct task_struct *thread) err = kfd_event_init_process(process); if (err) goto err_event_init; - process->is_32bit_user_mode = in_32bit_compat_syscall(); + process->is_32bit_user_mode = in_compat32_syscall();
process->pasid = kfd_pasid_alloc(); if (process->pasid == 0) { diff --git a/drivers/input/input.c b/drivers/input/input.c index b74f7b536ad6..13985b40772a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1074,7 +1074,7 @@ static int input_bits_to_string(char *buf, int buf_size, { int len = 0;
- if (in_32bit_compat_syscall()) { + if (in_compat32_syscall()) { u32 dword = bits >> 32; if (dword || !skip_empty) len += snprintf(buf, buf_size, "%x ", dword); diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 87b105a00cd0..cfa1b4e54209 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -315,7 +315,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) static inline int is_32bit_api(void) { #ifdef CONFIG_COMPAT - return in_32bit_compat_syscall(); + return in_compat32_syscall(); #else return (BITS_PER_LONG == 32); #endif diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8689d5a06078..3649258ff9ab 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -460,7 +460,7 @@ static inline int is_32bit_api(void) { #ifdef CONFIG_COMPAT - return in_32bit_compat_syscall(); + return in_compat32_syscall(); #else return (BITS_PER_LONG == 32); #endif diff --git a/include/linux/compat.h b/include/linux/compat.h index d72881d525ac..f6979417c673 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -1020,8 +1020,8 @@ int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, #ifndef in_compat_syscall static inline bool in_compat_syscall(void) { return is_compat_task(); } #endif -#ifndef in_32bit_compat_syscall -static inline bool in_32bit_compat_syscall(void) { return is_32bit_compat_task(); } +#ifndef in_compat32_syscall +static inline bool in_compat32_syscall(void) { return is_32bit_compat_task(); } #endif
#else /* !CONFIG_COMPAT */ @@ -1031,8 +1031,8 @@ static inline bool in_32bit_compat_syscall(void) { return is_32bit_compat_task() /* Ensure no one redefines in_compat_syscall() under !CONFIG_COMPAT */ #define in_compat_syscall in_compat_syscall static inline bool in_compat_syscall(void) { return false; } -#define in_32bit_compat_syscall in_32bit_compat_syscall -static inline bool in_32bit_compat_syscall(void) { return false; } +#define in_compat32_syscall in_compat32_syscall +static inline bool in_compat32_syscall(void) { return false; }
#endif /* CONFIG_COMPAT */
diff --git a/kernel/time/time.c b/kernel/time/time.c index 3d9be77e0425..1e2133b201cc 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -791,7 +791,7 @@ int get_timespec64(struct timespec64 *ts, ts->tv_sec = kts.tv_sec;
/* Zero out the padding in compat mode */ - if (in_32bit_compat_syscall()) + if (in_compat32_syscall()) kts.tv_nsec &= 0xFFFFFFFFUL;
/* In 32-bit mode, this drops the padding */