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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01660C433F5 for ; Thu, 24 Feb 2022 16:18:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2116C8D0002; Thu, 24 Feb 2022 11:18:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BFAF8D0001; Thu, 24 Feb 2022 11:18:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B00A8D0002; Thu, 24 Feb 2022 11:18:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id F11928D0001 for ; Thu, 24 Feb 2022 11:18:15 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B752A20E61 for ; Thu, 24 Feb 2022 16:18:15 +0000 (UTC) X-FDA: 79178180550.02.6D4B2E9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf04.hostedemail.com (Postfix) with ESMTP id B9ABE4000F for ; Thu, 24 Feb 2022 16:17:31 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD3D1616B2; Thu, 24 Feb 2022 16:17:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15370C340EC; Thu, 24 Feb 2022 16:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645719450; bh=vaqKWCQn/KTC6o8vuz3JHNxzJRZcTmSGl+sSsDj95XY=; h=From:To:Cc:Subject:Date:From; b=tauKN2g3+yhNNwD5/y461edh6+ZqSobOFtoMhf6FeNc+Zr94pN2Qv7gjce6BORJhB L/YK8fdNXI5S/DaYCWbytS+vjMMNLSFOECYO9uhnZzT/e08U1hwdb0FwuLvIhtRAr4 vHJm4LrNFMY8h7tknGwIqbLyJUqctymTl6JcmCg/XKzFPCqEChYMHjc3JYSIPcHKGV Z0k0AdMHgX8LMba2elef+JQUlIVZ//xVKr64pfg0DqwP8xrPZADM9ssu37k6HuxPf0 E7YN88Pssy+Su+gbD1IWfLwUbyQkzuafO0Ur0py14AzrHXoCNRssC1oJq2UeZIwY0s CuXMsdHx8MQ+w== From: Nathan Chancellor To: "Liam R. Howlett" Cc: linux-mm@kvack.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor Subject: [PATCH] lib/maple_tree: Fix clang -Wimplicit-fallthrough in mte_set_pivot() Date: Thu, 24 Feb 2022 09:17:05 -0700 Message-Id: <20220224161705.1937458-1-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B9ABE4000F X-Stat-Signature: qjkhymxkft6zx7h3hmgdwugfp8dprns4 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=tauKN2g3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf04.hostedemail.com: domain of nathan@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=nathan@kernel.org X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1645719451-663225 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001569, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Clang warns: lib/maple_tree.c:764:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] case maple_dense: ^ lib/maple_tree.c:764:2: note: insert 'break;' to avoid fall-through case maple_dense: ^ break; 1 error generated. Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1604 Signed-off-by: Nathan Chancellor --- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 5132495f86a6..5d8c39cbd517 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -761,6 +761,7 @@ static inline void mte_set_pivot(struct maple_enode *mn, unsigned char piv, break; case maple_arange_64: (&node->ma64)->pivot[piv] = val; + break; case maple_dense: break; } base-commit: 7ec16b08f9e0b656c96d20424b1cbbff4c78329c -- 2.35.1