mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
selftests/mm: remove unreachable returns after ksft exit helpers
The ksft_exit*() helpers such as ksft_exit_fail_msg() are declared __noreturn, and the ksft_exit() and ksft_finished() macros expand to calls of them, always terminating the process via exit(). Any return statements following such calls are unreachable, both at the end of main() and on error paths of helper functions. Remove all of them. No functional change. Link: https://lore.kernel.org/20260903135251.39593-1-zenghui.yu@linux.dev Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Reviewed-by: SJ Park <sj@kernel.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Assisted-by: GLM-5.3 OpenCode Cc: Kiryl Shutsemau <kas@kernel.org> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Barry Song <baohua@kernel.org> Cc: David Hildenbrand <david@kernel.org> Cc: Dev Jain <dev.jain@arm.com> Cc: Lance Yang <lance.yang@linux.dev> Cc: Liam R. Howlett <liam@infradead.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org>
This commit is contained in:
parent
908dd0101e
commit
aa4998d62b
|
|
@ -269,6 +269,4 @@ int main(void)
|
|||
NUM_ITERATIONS);
|
||||
|
||||
ksft_exit(iter == NUM_ITERATIONS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ int get_proc_locked_vm_size(void)
|
|||
|
||||
fclose(f);
|
||||
ksft_exit_fail_msg("cannot parse VmLck in /proc/self/status: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -556,5 +556,4 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
ksft_finished();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ static bool is_backed_by_folio(char *vaddr, int order, int pagemap_fd,
|
|||
return (pfn_flags & folio_tail_flags) != folio_tail_flags;
|
||||
fail:
|
||||
ksft_exit_fail_msg("Failed to get folio info\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
static int check_after_split_folio_orders(char *vaddr_start, size_t len,
|
||||
|
|
@ -548,7 +547,6 @@ static int create_pagecache_thp_and_fd(const char *testfile, size_t fd_size,
|
|||
err_out_unlink:
|
||||
unlink(testfile);
|
||||
ksft_exit_fail_msg("Failed to create large pagecache folios\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void split_thp_in_pagecache_to_order_at(size_t fd_size,
|
||||
|
|
@ -711,6 +709,4 @@ int main(int argc, char **argv)
|
|||
free(expected_orders);
|
||||
|
||||
ksft_finished();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user