[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <005af416-66fa-4222-964d-e20bd2eccb7f@arm.com>
Date: Thu, 7 Aug 2025 10:32:41 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Bala-Vignesh-Reddy <reddybalavignesh9979@...il.com>,
linux-arm-kernel@...ts.infradead.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Shuah Khan <shuah@...nel.org>, Mark Brown <broonie@...nel.org>,
Yeoreum Yun <yeoreum.yun@....com>
Subject: Re: [PATCH] selftests: arm64: Fix -Waddress warning in tpidr2 test
On 07/08/25 2:09 AM, Bala-Vignesh-Reddy wrote:
> Resolve compiler warning about always true condition in ksft_test_result
> in tpidr2, passing actual function.
>
> This silences -Waddress warning while maintaining test functionality.
Might be better to just add the compiler warning in the commit message.
Also does it need a Fixes: tag for the relevant commit as well ?
6d80cb73131d ("kselftest/arm64: Convert tpidr2 test to use kselftest.h")
>
> Signed-off-by: Bala-Vignesh-Reddy <reddybalavignesh9979@...il.com>
> ---
> tools/testing/selftests/arm64/abi/tpidr2.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/arm64/abi/tpidr2.c b/tools/testing/selftests/arm64/abi/tpidr2.c
> index f58a9f89b952..4c89ab0f1010 100644
> --- a/tools/testing/selftests/arm64/abi/tpidr2.c
> +++ b/tools/testing/selftests/arm64/abi/tpidr2.c
> @@ -227,10 +227,10 @@ int main(int argc, char **argv)
> ret = open("/proc/sys/abi/sme_default_vector_length", O_RDONLY, 0);
> if (ret >= 0) {
> ksft_test_result(default_value(), "default_value\n");
> - ksft_test_result(write_read, "write_read\n");
> - ksft_test_result(write_sleep_read, "write_sleep_read\n");
> - ksft_test_result(write_fork_read, "write_fork_read\n");
> - ksft_test_result(write_clone_read, "write_clone_read\n");
> + ksft_test_result(write_read(), "write_read\n");
> + ksft_test_result(write_sleep_read(), "write_sleep_read\n");
> + ksft_test_result(write_fork_read(), "write_fork_read\n");
> + ksft_test_result(write_clone_read(), "write_clone_read\n");
>
> } else {
> ksft_print_msg("SME support not present\n");Otherwise LGTM.
Powered by blists - more mailing lists