Re: [PATCH v1 1/1] arm64: remove unnecessary ifdefs around is_compat_task()

From: Arnd Bergmann
Date: Fri Jan 05 2024 - 05:46:26 EST


On Fri, Jan 5, 2024, at 05:15, Leonardo Bras wrote:
> Currently some parts of the codebase will test for CONFIG_COMPAT before
> testing is_compat_task().
>
> is_compat_task() is a inlined function only present on CONFIG_COMPAT.
> On the other hand, for !CONFIG_COMPAT, we have in linux/compat.h:
>
> #define is_compat_task() (0)
>
> Since we have this define available in every usage of is_compat_task() for
> !CONFIG_COMPAT, it's unnecessary to keep the ifdefs, since the compiler is
> smart enough to optimize-out those snippets on CONFIG_COMPAT=n
>
> Signed-off-by: Leonardo Bras <leobras@xxxxxxxxxx>

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>