summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2024-11-08 13:49:18 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2024-11-11 22:45:36 +0000
commit0cc6b94a445c53ab152554b4cf60575e1396adf6 (patch)
tree827ae7cc0678378765a8a70fa7e423281d1d0d4f /tools/testing
parentb6bd50dd3b564d50b8cd748de6bae58804ecb768 (diff)
kselftest/arm64: Fix printf() warning in the arm64 MTE prctl() test
While prctl() returns an 'int', the PR_MTE_TCF_MASK is defined as unsigned long which results in the larger type following a bitwise 'and' operation. Cast the printf() argument to 'int'. Cc: Shuah Khan <skhan@linuxfoundation.org> Cc: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241108134920.1233992-3-catalin.marinas@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/arm64/mte/check_prctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/arm64/mte/check_prctl.c b/tools/testing/selftests/arm64/mte/check_prctl.c
index f139a33a43ef..4c89e9538ca0 100644
--- a/tools/testing/selftests/arm64/mte/check_prctl.c
+++ b/tools/testing/selftests/arm64/mte/check_prctl.c
@@ -85,7 +85,7 @@ void set_mode_test(const char *name, int hwcap2, int mask)
ksft_test_result_pass("%s\n", name);
} else {
ksft_print_msg("Got %x, expected %x\n",
- (ret & PR_MTE_TCF_MASK), mask);
+ (ret & (int)PR_MTE_TCF_MASK), mask);
ksft_test_result_fail("%s\n", name);
}
}