From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Andy Lutomirski" <luto@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Shuah Khan" <shuah@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: usama.anjum@collabora.com, Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 5/7] selftests: vDSO: vdso_test_getrandom: Drop some dead code
Date: Fri, 2 May 2025 18:46:28 +0500 [thread overview]
Message-ID: <a7365a45-6064-4ace-81da-ce46ea5a6c91@collabora.com> (raw)
In-Reply-To: <20250502-selftests-vdso-fixes-v1-5-fb5d640a4f78@linutronix.de>
On 5/2/25 5:40 PM, Thomas Weißschuh wrote:
> vgetrandom_put_state() and the variable ret in kselftest() are never used.
>
> Drop the dead code.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> tools/testing/selftests/vDSO/vdso_test_getrandom.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> index f36e50f372f935e6d4da3175c81e210653bdce1d..b0e0d664508a38d6dde9df0a61ec8198ee928a17 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> @@ -100,15 +100,6 @@ static void *vgetrandom_get_state(void)
> return state;
> }
>
> -static void vgetrandom_put_state(void *state)
> -{
> - if (!state)
> - return;
> - pthread_mutex_lock(&vgrnd.lock);
> - vgrnd.states[vgrnd.len++] = state;
> - pthread_mutex_unlock(&vgrnd.lock);
> -}
> -
> static void vgetrandom_init(void)
> {
> const char *version = versions[VDSO_VERSION];
> @@ -264,7 +255,7 @@ static void kselftest(void)
> }
> for (;;) {
> struct ptrace_syscall_info info = { 0 };
> - int status, ret;
> + int status;
> ksft_assert(waitpid(child, &status, 0) >= 0);
> if (WIFEXITED(status)) {
> ksft_assert(WEXITSTATUS(status) == 0);
>
--
Regards,
Usama
next prev parent reply other threads:[~2025-05-02 13:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 12:40 [PATCH 0/7] selftests: vDSO: Some cleanups and fixes Thomas Weißschuh
2025-05-02 12:40 ` [PATCH 1/7] selftests: vDSO: chacha: Correctly skip test if necessary Thomas Weißschuh
2025-05-02 13:42 ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 2/7] selftests: vDSO: clock_getres: Drop unused include of err.h Thomas Weißschuh
2025-05-02 13:43 ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 3/7] selftests: vDSO: vdso_test_correctness: Fix -Wold-style-definitions Thomas Weißschuh
2025-05-02 13:44 ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 4/7] selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h Thomas Weißschuh
2025-05-02 12:40 ` [PATCH 5/7] selftests: vDSO: vdso_test_getrandom: Drop some dead code Thomas Weißschuh
2025-05-02 13:46 ` Muhammad Usama Anjum [this message]
2025-05-02 12:40 ` [PATCH 6/7] selftests: vDSO: vdso_test_getrandom: Always print TAP header Thomas Weißschuh
2025-05-02 13:48 ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 7/7] selftests: vDSO: vdso_config: Avoid -Wunused-variables Thomas Weißschuh
2025-05-02 13:49 ` Muhammad Usama Anjum
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=a7365a45-6064-4ace-81da-ce46ea5a6c91@collabora.com \
--to=usama.anjum@collabora.com \
--cc=Jason@zx2c4.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@linutronix.de \
--cc=thomas.weissschuh@linutronix.de \
--cc=vincenzo.frascino@arm.com \
/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®