mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 09:33:31 +02:00
selftests/mm: don't compare return values to in cow
Tweak the coding style for checking for non-zero return values. While we're at it also remove a now redundant oring of the madvise() return code. Link: https://lkml.kernel.org/r/20250610-selftest-mm-cow-tweaks-v1-3-43cd7457500f@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Suggested-by: David Hildenbrand <david@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
5fbfb1f39d
commit
32dc2d5e3f
|
|
@ -1613,13 +1613,13 @@ static void run_with_huge_zeropage(non_anon_test_fn fn, const char *desc)
|
|||
smem = (char *)(((uintptr_t)mmap_smem + pmdsize) & ~(pmdsize - 1));
|
||||
|
||||
ret = madvise(mem, pmdsize, MADV_HUGEPAGE);
|
||||
if (ret != 0) {
|
||||
if (ret) {
|
||||
ksft_perror("madvise()");
|
||||
log_test_result(KSFT_FAIL);
|
||||
goto munmap;
|
||||
}
|
||||
ret |= madvise(smem, pmdsize, MADV_HUGEPAGE);
|
||||
if (ret != 0) {
|
||||
ret = madvise(smem, pmdsize, MADV_HUGEPAGE);
|
||||
if (ret) {
|
||||
ksft_perror("madvise()");
|
||||
log_test_result(KSFT_FAIL);
|
||||
goto munmap;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user