lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 15 Dec 2023 14:54:48 +0100
From: Alexandre Ghiti <alex@...ti.fr>
To: Christoph Muellner <christoph.muellner@...ll.eu>,
 linux-riscv@...ts.infradead.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, Palmer Dabbelt <palmer@...belt.com>,
 Paul Walmsley <paul.walmsley@...ive.com>, Albert Ou <aou@...s.berkeley.edu>,
 Shuah Khan <shuah@...nel.org>
Cc: Philipp Tomsich <philipp.tomsich@...ll.eu>,
 Andrew Jones <ajones@...tanamicro.com>, Evan Green <evan@...osinc.com>,
 Xiao Wang <xiao.w.wang@...el.com>, Alexandre Ghiti <alexghiti@...osinc.com>,
 Andy Chiu <andy.chiu@...ive.com>, Björn Töpel
 <bjorn@...osinc.com>, Charlie Jenkins <charlie@...osinc.com>
Subject: Re: [PATCH 2/5] tools: selftests: riscv: Fix compile warnings in cbo

On 23/11/2023 19:58, Christoph Muellner wrote:
> From: Christoph Müllner <christoph.muellner@...ll.eu>
>
> GCC prints a couple of format string warnings when compiling
> the cbo test. Let's follow the recommendation in
> Documentation/printk-formats.txt to fix these warnings.
>
> Signed-off-by: Christoph Müllner <christoph.muellner@...ll.eu>
> ---
>   tools/testing/selftests/riscv/hwprobe/cbo.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/riscv/hwprobe/cbo.c b/tools/testing/selftests/riscv/hwprobe/cbo.c
> index 50a2cc8aef38..c6a83ab11e22 100644
> --- a/tools/testing/selftests/riscv/hwprobe/cbo.c
> +++ b/tools/testing/selftests/riscv/hwprobe/cbo.c
> @@ -97,7 +97,7 @@ static void test_zicboz(void *arg)
>   	block_size = pair.value;
>   	ksft_test_result(rc == 0 && pair.key == RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE &&
>   			 is_power_of_2(block_size), "Zicboz block size\n");
> -	ksft_print_msg("Zicboz block size: %ld\n", block_size);
> +	ksft_print_msg("Zicboz block size: %llu\n", block_size);
>   
>   	illegal_insn = false;
>   	cbo_zero(&mem[block_size]);
> @@ -121,7 +121,7 @@ static void test_zicboz(void *arg)
>   		for (j = 0; j < block_size; ++j) {
>   			if (mem[i * block_size + j] != expected) {
>   				ksft_test_result_fail("cbo.zero check\n");
> -				ksft_print_msg("cbo.zero check: mem[%d] != 0x%x\n",
> +				ksft_print_msg("cbo.zero check: mem[%llu] != 0x%x\n",
>   					       i * block_size + j, expected);
>   				return;
>   			}
> @@ -201,7 +201,7 @@ int main(int argc, char **argv)
>   	pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0;
>   	rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, 0);
>   	if (rc < 0)
> -		ksft_exit_fail_msg("hwprobe() failed with %d\n", rc);
> +		ksft_exit_fail_msg("hwprobe() failed with %ld\n", rc);
>   	assert(rc == 0 && pair.key == RISCV_HWPROBE_KEY_IMA_EXT_0);
>   
>   	if (pair.value & RISCV_HWPROBE_EXT_ZICBOZ) {


You can add:

Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks!

Alex


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ