2022-08-26 16:05:51

by Lukas Straub

[permalink] [raw]
Subject: [PATCH 1/2] um: Cleanup syscall_handler_t cast in syscalls_32.h

Like in f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9
"um: Cleanup syscall_handler_t definition/cast, fix warning",
remove the cast to to fix the compiler warning.

Signed-off-by: Lukas Straub <[email protected]>
---
arch/x86/um/shared/sysdep/syscalls_32.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/um/shared/sysdep/syscalls_32.h b/arch/x86/um/shared/sysdep/syscalls_32.h
index 68fd2cf526fd..f6e9f84397e7 100644
--- a/arch/x86/um/shared/sysdep/syscalls_32.h
+++ b/arch/x86/um/shared/sysdep/syscalls_32.h
@@ -6,10 +6,9 @@
#include <asm/unistd.h>
#include <sysdep/ptrace.h>

-typedef long syscall_handler_t(struct pt_regs);
+typedef long syscall_handler_t(struct syscall_args);

extern syscall_handler_t *sys_call_table[];

#define EXECUTE_SYSCALL(syscall, regs) \
- ((long (*)(struct syscall_args)) \
- (*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))
+ ((*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))
--
2.37.2


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2022-08-26 21:13:26

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 1/2] um: Cleanup syscall_handler_t cast in syscalls_32.h



On 8/26/22 08:29, Lukas Straub wrote:
> Like in f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9
> "um: Cleanup syscall_handler_t definition/cast, fix warning",
> remove the cast to to fix the compiler warning.
>
> Signed-off-by: Lukas Straub <[email protected]>

Acked-by: Randy Dunlap <[email protected]> # build-tested

Thanks.

> ---
> arch/x86/um/shared/sysdep/syscalls_32.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/um/shared/sysdep/syscalls_32.h b/arch/x86/um/shared/sysdep/syscalls_32.h
> index 68fd2cf526fd..f6e9f84397e7 100644
> --- a/arch/x86/um/shared/sysdep/syscalls_32.h
> +++ b/arch/x86/um/shared/sysdep/syscalls_32.h
> @@ -6,10 +6,9 @@
> #include <asm/unistd.h>
> #include <sysdep/ptrace.h>
>
> -typedef long syscall_handler_t(struct pt_regs);
> +typedef long syscall_handler_t(struct syscall_args);
>
> extern syscall_handler_t *sys_call_table[];
>
> #define EXECUTE_SYSCALL(syscall, regs) \
> - ((long (*)(struct syscall_args)) \
> - (*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))
> + ((*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))

--
~Randy