Re: [PATCH] selftests/mm: remove unreachable returns after ksft exit helpers
From: SJ Park
Date: Thu Sep 03 2026 - 20:49:32 EST
'get_maintainer.pl --nogit --nogit-fallback' on mm-new suggests adding Kiryl.
I added him.
- Kiryl Shutsemau <kas@xxxxxxxxxx>
On Thu, 3 Sep 2026 21:52:51 +0800 Zenghui Yu <zenghui.yu@xxxxxxxxx> wrote:
> From: "Zenghui Yu (Huawei)" <zenghui.yu@xxxxxxxxx>
>
> 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.
Makes sense and looks correct to me :)
>
> Assisted-by: GLM-5.3 OpenCode
> Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@xxxxxxxxx>
Reviewed-by: SJ Park <sj@xxxxxxxxxx>
Thanks,
SJ
[...]