From patchwork Fri Nov 5 20:35:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BBC1C433FE for ; Fri, 5 Nov 2021 20:35:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 188DD6127A for ; Fri, 5 Nov 2021 20:35:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 188DD6127A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3A0BB94000E; Fri, 5 Nov 2021 16:35:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3511F94000D; Fri, 5 Nov 2021 16:35:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 217B294000E; Fri, 5 Nov 2021 16:35:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 102E694000D for ; Fri, 5 Nov 2021 16:35:14 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CCE03184D7B13 for ; Fri, 5 Nov 2021 20:35:13 +0000 (UTC) X-FDA: 78776031306.06.73BA619 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP id 27F9CF000091 for ; Fri, 5 Nov 2021 20:35:05 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B96A61242; Fri, 5 Nov 2021 20:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144502; bh=2hc4vY4Tu2uTNEDtYnPWoJC+AGdi9+R26xbGbgeX9Hg=; h=Date:From:To:Subject:In-Reply-To:From; b=GqbnmHlQUlOu1xWZrXSNdHpdpEPdcJKXcFgduDtyqQjKfTImcOXJq0FNJiW4+bCd2 H9uvxQeEhYe9No+wWeMNE/ZJ7sjP6fFuHDthepv/f+KWOVvR8vJYTPqAl0HnaMZSbu Zp22ogdInNj1mbFGsCeFsOnB66lw5at+yEDGT4ug= Date: Fri, 05 Nov 2021 13:35:01 -0700 From: Andrew Morton To: akpm@linux-foundation.org, arnd@arndb.de, christian.brauner@ubuntu.com, jamorris@linux.microsoft.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, mszeredi@redhat.com, serge@hallyn.com, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk Subject: [patch 009/262] fs/posix_acl.c: avoid -Wempty-body warning Message-ID: <20211105203501.yNYlpMbop%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 27F9CF000091 X-Stat-Signature: w71pcz17z4j5y8kqc4eobs81yy6yr91p Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=GqbnmHlQ; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1636144505-859756 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Arnd Bergmann Subject: fs/posix_acl.c: avoid -Wempty-body warning 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. Link: https://lkml.kernel.org/r/20210927102410.1863853-1-arnd@kernel.org Link: https://lore.kernel.org/all/20210322132103.qiun2rjilnlgztxe@wittgenstein/ Signed-off-by: Arnd Bergmann Reviewed-by: Christian Brauner Cc: Alexander Viro Cc: James Morris Cc: Serge Hallyn Cc: Miklos Szeredi Signed-off-by: Andrew Morton --- fs/posix_acl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/posix_acl.c~posix-acl-avoid-wempty-body-warning +++ a/fs/posix_acl.c @@ -134,8 +134,7 @@ struct posix_acl *get_acl(struct inode * * to just call ->get_acl to fetch the ACL ourself. (This is going to * be an unlikely race.) */ - if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) - /* fall through */ ; + cmpxchg(p, ACL_NOT_CACHED, sentinel); /* * Normally, the ACL returned by ->get_acl will be cached.