Re: [PATCH] [v2] posix-acl: avoid -Wempty-body warning

From: Christian Brauner
Date: Mon Mar 22 2021 - 09:24:10 EST


On Mon, Mar 22, 2021 at 02:13:59PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The fallthrough comment for an ignored cmpxchg() return value
> produces a harmless warning with 'make W=1':
>
> fs/posix_acl.c: In function 'get_acl':
> fs/posix_acl.c:127:36: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> 127 | /* fall through */ ;
> | ^
>
> Simplify it as a step towards a clean W=1 build. As all architectures
> define cmpxchg() as a statement expression these days, it is no longer
> necessary to evaluate its return code, and the if() can just be droped.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---

Thanks you!
Reviewed-by: Christian Brauner <christian.brauner@xxxxxxxxxx>