lkml.org 
[lkml]   [2022]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tools: Strong conversion of void type pointer could be removed
From
Date
On 6/27/22 2:56 AM, Li kunyu wrote:
> The void pointer argument does not require a cast assignment because it
> is the address passed.
>

Please include information on you found this problem with output
from the tool if any used. Send v2 with that information included
in the commit log.

> Signed-off-by: Li kunyu <kunyu@nfschina.com>
> ---
> tools/testing/selftests/x86/fsgsbase.c | 2 +-
> tools/testing/selftests/x86/test_vsyscall.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/x86/fsgsbase.c b/tools/testing/selftests/x86/fsgsbase.c
> index 8c780cce941d..5d99261317e1 100644
> --- a/tools/testing/selftests/x86/fsgsbase.c
> +++ b/tools/testing/selftests/x86/fsgsbase.c
> @@ -63,7 +63,7 @@ static void clearhandler(int sig)
>
> static void sigsegv(int sig, siginfo_t *si, void *ctx_void)
> {
> - ucontext_t *ctx = (ucontext_t*)ctx_void;
> + ucontext_t *ctx = ctx_void;
>
> if (!want_segv) {
> clearhandler(SIGSEGV);
> diff --git a/tools/testing/selftests/x86/test_vsyscall.c b/tools/testing/selftests/x86/test_vsyscall.c
> index 5b45e6986aea..2416941a0952 100644
> --- a/tools/testing/selftests/x86/test_vsyscall.c
> +++ b/tools/testing/selftests/x86/test_vsyscall.c
> @@ -184,7 +184,7 @@ static volatile unsigned long segv_err;
>
> static void sigsegv(int sig, siginfo_t *info, void *ctx_void)
> {
> - ucontext_t *ctx = (ucontext_t *)ctx_void;
> + ucontext_t *ctx = ctx_void;
>
> segv_err = ctx->uc_mcontext.gregs[REG_ERR];
> siglongjmp(jmpbuf, 1);
>

thanks,
-- Shuah

\
 
 \ /
  Last update: 2022-06-27 21:59    [W:0.048 / U:4.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site