]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/syscalls: Add pt_regs parameter to SYSCALL_DEFINE0() syscall wrapper
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 10 Nov 2025 18:54:35 +0000 (19:54 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 17 Nov 2025 10:10:38 +0000 (11:10 +0100)
All system call wrappers should match the sys_call_ptr_t type. This is not
the case for system calls without parameters. Add the missing pt_regs
parameter there too.

Note: this is currently not a problem, since the parameter is unused.
However it prevents to create a correctly typed system call table in
C. With the current assembler implementation this works because of
missing type checking.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/syscall_wrapper.h

index 35c1d1b860d88a6d82d02fe55cbd89ab0ccea231..bf1ff5e9242d4f988e56fe1b73bd9fba4cae7c06 100644 (file)
  * named __s390x_sys_*()
  */
 #define COMPAT_SYSCALL_DEFINE0(sname)                                  \
-       long __s390_compat_sys_##sname(void);                           \
+       long __s390_compat_sys_##sname(struct pt_regs *__unused);       \
        ALLOW_ERROR_INJECTION(__s390_compat_sys_##sname, ERRNO);        \
-       long __s390_compat_sys_##sname(void)
+       long __s390_compat_sys_##sname(struct pt_regs *__unused)
 
 #define SYSCALL_DEFINE0(sname)                                         \
        SYSCALL_METADATA(_##sname, 0);                                  \
-       long __s390_sys_##sname(void);                                  \
+       long __s390_sys_##sname(struct pt_regs *__unused);              \
        ALLOW_ERROR_INJECTION(__s390_sys_##sname, ERRNO);               \
-       long __s390x_sys_##sname(void);                                 \
+       long __s390x_sys_##sname(struct pt_regs *__unused);             \
        ALLOW_ERROR_INJECTION(__s390x_sys_##sname, ERRNO);              \
        static inline long __do_sys_##sname(void);                      \
-       long __s390_sys_##sname(void)                                   \
+       long __s390_sys_##sname(struct pt_regs *__unused)               \
        {                                                               \
                return __do_sys_##sname();                              \
        }                                                               \
-       long __s390x_sys_##sname(void)                                  \
+       long __s390x_sys_##sname(struct pt_regs *__unused)              \
        {                                                               \
                return __do_sys_##sname();                              \
        }                                                               \
 
 #define SYSCALL_DEFINE0(sname)                                         \
        SYSCALL_METADATA(_##sname, 0);                                  \
-       long __s390x_sys_##sname(void);                                 \
+       long __s390x_sys_##sname(struct pt_regs *__unused);             \
        ALLOW_ERROR_INJECTION(__s390x_sys_##sname, ERRNO);              \
        static inline long __do_sys_##sname(void);                      \
-       long __s390x_sys_##sname(void)                                  \
+       long __s390x_sys_##sname(struct pt_regs *__unused)              \
        {                                                               \
                return __do_sys_##sname();                              \
        }                                                               \