mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
kselftest/arm64: Fix printf() compiler warnings in the arm64 fp tests
Lots of incorrect length modifiers, missing arguments or conversion specifiers. Fix them. Cc: Shuah Khan <skhan@linuxfoundation.org> Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241108134920.1233992-2-catalin.marinas@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
ae465d9ca1
commit
b6bd50dd3b
@ -82,10 +82,12 @@ static void fill_buf(char *buf, size_t size)
|
||||
static int do_child(void)
|
||||
{
|
||||
if (ptrace(PTRACE_TRACEME, -1, NULL, NULL))
|
||||
ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
|
||||
ksft_exit_fail_msg("ptrace(PTRACE_TRACEME) failed: %s (%d)\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
if (raise(SIGSTOP))
|
||||
ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
|
||||
ksft_exit_fail_msg("raise(SIGSTOP) failed: %s (%d)\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@ -340,7 +342,7 @@ static void ptrace_set_sve_get_sve_data(pid_t child,
|
||||
data_size = SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE);
|
||||
write_buf = malloc(data_size);
|
||||
if (!write_buf) {
|
||||
ksft_test_result_fail("Error allocating %d byte buffer for %s VL %u\n",
|
||||
ksft_test_result_fail("Error allocating %ld byte buffer for %s VL %u\n",
|
||||
data_size, type->name, vl);
|
||||
return;
|
||||
}
|
||||
@ -441,7 +443,7 @@ static void ptrace_set_sve_get_fpsimd_data(pid_t child,
|
||||
data_size = SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE);
|
||||
write_buf = malloc(data_size);
|
||||
if (!write_buf) {
|
||||
ksft_test_result_fail("Error allocating %d byte buffer for %s VL %u\n",
|
||||
ksft_test_result_fail("Error allocating %ld byte buffer for %s VL %u\n",
|
||||
data_size, type->name, vl);
|
||||
return;
|
||||
}
|
||||
@ -545,7 +547,7 @@ static void ptrace_set_fpsimd_get_sve_data(pid_t child,
|
||||
read_sve = read_buf;
|
||||
|
||||
if (read_sve->vl != vl) {
|
||||
ksft_test_result_fail("Child VL != expected VL %d\n",
|
||||
ksft_test_result_fail("Child VL != expected VL: %u != %u\n",
|
||||
read_sve->vl, vl);
|
||||
goto out;
|
||||
}
|
||||
@ -555,7 +557,7 @@ static void ptrace_set_fpsimd_get_sve_data(pid_t child,
|
||||
case SVE_PT_REGS_FPSIMD:
|
||||
expected_size = SVE_PT_FPSIMD_SIZE(vq, SVE_PT_REGS_FPSIMD);
|
||||
if (read_sve_size < expected_size) {
|
||||
ksft_test_result_fail("Read %d bytes, expected %d\n",
|
||||
ksft_test_result_fail("Read %ld bytes, expected %ld\n",
|
||||
read_sve_size, expected_size);
|
||||
goto out;
|
||||
}
|
||||
@ -571,7 +573,7 @@ static void ptrace_set_fpsimd_get_sve_data(pid_t child,
|
||||
case SVE_PT_REGS_SVE:
|
||||
expected_size = SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE);
|
||||
if (read_sve_size < expected_size) {
|
||||
ksft_test_result_fail("Read %d bytes, expected %d\n",
|
||||
ksft_test_result_fail("Read %ld bytes, expected %ld\n",
|
||||
read_sve_size, expected_size);
|
||||
goto out;
|
||||
}
|
||||
|
@ -48,10 +48,12 @@ static void fill_buf(char *buf, size_t size)
|
||||
static int do_child(void)
|
||||
{
|
||||
if (ptrace(PTRACE_TRACEME, -1, NULL, NULL))
|
||||
ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
|
||||
ksft_exit_fail_msg("ptrace(PTRACE_TRACEME) failed: %s (%d)",
|
||||
strerror(errno), errno);
|
||||
|
||||
if (raise(SIGSTOP))
|
||||
ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
|
||||
ksft_exit_fail_msg("raise(SIGSTOP) failed: %s (%d)\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@ -201,7 +203,7 @@ static void ptrace_set_get_data(pid_t child, unsigned int vl)
|
||||
data_size = ZA_PT_SIZE(vq);
|
||||
write_buf = malloc(data_size);
|
||||
if (!write_buf) {
|
||||
ksft_test_result_fail("Error allocating %d byte buffer for VL %u\n",
|
||||
ksft_test_result_fail("Error allocating %ld byte buffer for VL %u\n",
|
||||
data_size, vl);
|
||||
return;
|
||||
}
|
||||
|
@ -43,10 +43,12 @@ static void fill_buf(char *buf, size_t size)
|
||||
static int do_child(void)
|
||||
{
|
||||
if (ptrace(PTRACE_TRACEME, -1, NULL, NULL))
|
||||
ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
|
||||
ksft_exit_fail_msg("ptrace(PTRACE_TRACEME) failed: %s (%d)\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
if (raise(SIGSTOP))
|
||||
ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
|
||||
ksft_exit_fail_msg("raise(SIGSTOP) failed: %s (%d)\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@ -231,7 +233,7 @@ static void ptrace_enable_za_via_zt(pid_t child)
|
||||
/* Should have register data */
|
||||
if (za_out->size < ZA_PT_SIZE(vq)) {
|
||||
ksft_print_msg("ZA data less than expected: %u < %u\n",
|
||||
za_out->size, ZA_PT_SIZE(vq));
|
||||
za_out->size, (unsigned int)ZA_PT_SIZE(vq));
|
||||
fail = true;
|
||||
vq = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user