From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B8E1C433E0 for ; Mon, 22 Mar 2021 12:15:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B01961992 for ; Mon, 22 Mar 2021 12:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229810AbhCVMPi (ORCPT ); Mon, 22 Mar 2021 08:15:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48986 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbhCVMPO (ORCPT ); Mon, 22 Mar 2021 08:15:14 -0400 Received: from ip5f5af0a0.dynamic.kabel-deutschland.de ([95.90.240.160] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lOJSd-0004v2-7T; Mon, 22 Mar 2021 12:15:07 +0000 Date: Mon, 22 Mar 2021 13:15:06 +0100 From: Christian Brauner To: Arnd Bergmann Cc: Alexander Viro , Arnd Bergmann , James Morris , Serge Hallyn , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] posix-acl: avoid -Wempty-body warning Message-ID: <20210322121506.r4yx6n6652nvrz6m@wittgenstein> References: <20210322113829.3239999-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210322113829.3239999-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 12:38:24PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 */ ; > | ^ > > Rewrite it as gcc suggests as a step towards a clean W=1 build. > On most architectures, we could just drop the if() entirely, but > in some cases this causes a different warning. And you don't see the warning for the second unconditional cmpxchg(p, sentinel, ACL_NOT_CACHED); below? > > Signed-off-by: Arnd Bergmann > --- In any case that should be fine, Reviewed-by: Christian Brauner