[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' fro
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context() |
Date: |
Fri, 6 Nov 2020 09:10:10 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 11/6/20 7:27 AM, Peter Maydell wrote:
> Unlike the kernel macros, our __get_user() and __put_user() do not
> return a failure code. Kernel code typically has a style of
> err |= __get_user(...); err |= __get_user(...);
> and then checking err at the end. In sparc64_get_context() our
> version of the code dropped the accumulating into err but left the
> "if (err) goto do_sigsegv" checks, which will never be taken. Delete
> unnecessary if()s.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> linux-user/sparc/signal.c | 4 ----
> 1 file changed, 4 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- [PATCH v2 0/4] linux/sparc: more get/set_context fixes, Peter Maydell, 2020/11/06
- [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling, Peter Maydell, 2020/11/06
- [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context(), Peter Maydell, 2020/11/06
- Re: [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context(),
Richard Henderson <=
- [PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context(), Peter Maydell, 2020/11/06
- [PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context(), Peter Maydell, 2020/11/06
- Re: [PATCH v2 0/4] linux/sparc: more get/set_context fixes, Peter Maydell, 2020/11/06