]> git.hungrycats.org Git - linux/commit
selftest/timerns: fix clang build failures for abs() calls
authorJohn Hubbard <jhubbard@nvidia.com>
Thu, 4 Jul 2024 02:52:47 +0000 (19:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:40 +0000 (09:53 +0200)
commit8f0b9b17e276789baa7396f3cba7b8ea2834187a
tree5abf3df6d77669779edb5484b5fbee9d04e72b33
parent62916eb15931823b60131e2f1d32a0251af58742
selftest/timerns: fix clang build failures for abs() calls

[ Upstream commit f76f9bc616b7320df6789241ca7d26cedcf03cf3 ]

When building with clang, via:

    make LLVM=1 -C tools/testing/selftests

...clang warns about mismatches between the expected and required
integer length being supplied to abs(3).

Fix this by using the correct variant of abs(3): labs(3) or llabs(3), in
these cases.

Reviewed-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Andrei Vagin <avagin@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/timens/exec.c
tools/testing/selftests/timens/timer.c
tools/testing/selftests/timens/timerfd.c
tools/testing/selftests/timens/vfork_exec.c