From: Shuah Khan <skhan@linuxfoundation.org>
To: Li kunyu <kunyu@nfschina.com>, shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] tools: Strong conversion of void type pointer could be removed
Date: Mon, 27 Jun 2022 13:57:47 -0600 [thread overview]
Message-ID: <9b587975-db5b-c7bf-eb8f-bd6e5c3d9f54@linuxfoundation.org> (raw)
In-Reply-To: <20220627085654.2902-1-kunyu@nfschina.com>
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
next prev parent reply other threads:[~2022-06-27 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 8:56 Li kunyu
2022-06-27 19:57 ` Shuah Khan [this message]
2022-06-29 2:42 ` Li kunyu
2022-06-29 23:09 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b587975-db5b-c7bf-eb8f-bd6e5c3d9f54@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=kunyu@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®