This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 12/17] RISC-V: Linux Syscall Interface
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, <patches at groups dot riscv dot org>
- Date: Mon, 15 Jan 2018 17:27:35 +0000
- Subject: Re: [PATCH v4 12/17] RISC-V: Linux Syscall Interface
- Authentication-results: sourceware.org; auth=none
- References: <20180113103816.4861-1-palmer@dabbelt.com> <20180113103816.4861-13-palmer@dabbelt.com>
On Sat, 13 Jan 2018, Palmer Dabbelt wrote:
> + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
> + {
> + return __syscall_error (ret);
> + }
Generically, avoid redundant braces when there's only a single statement
inside "if".
> +# define internal_syscall2(number, err, arg0, arg1) \
> +({ \
> + long int _sys_result; \
> + \
> + { \
> + register long int __a7 asm ("a7") = number; \
> + register long int __a0 asm ("a0") = (long int) (arg0); \
> + register long int __a1 asm ("a1") = (long int) (arg1); \
> + __asm__ volatile ( \
> + "scall\n\t" \
> + : "+r" (__a0) \
> + : "r" (__a7), "r"(__a1) \
Missing space before '(' in asm constraint, ans likewise in other such
syscall macros.
--
Joseph S. Myers
joseph@codesourcery.com