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=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 DB4B5C433E0 for ; Mon, 27 Jul 2020 22:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC57620829 for ; Mon, 27 Jul 2020 22:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595890706; bh=qSmrTtFXENPcWfK3gi2Tfbj7Z60T+4LO1JAiAhLjHLc=; h=Date:From:To:Cc:Subject:List-ID:From; b=s9URQ+a1gPl5mL5j3sC25rKnRKmQA5JUOcLwXG5Gplr+HlNLHPNoUgx6hD9OCneH4 g4L/j1yr9uQxyaqQnCyGn7Iq7aUmGyvyNx/gupZpyI4eTbmTzzT77sHewiW2QqPxd6 hFZ9owab08MzGIjEIMU90eH3FRRdPxSF9MX0mW8s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgG0W60 (ORCPT ); Mon, 27 Jul 2020 18:58:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:50690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbgG0W60 (ORCPT ); Mon, 27 Jul 2020 18:58:26 -0400 Received: from embeddedor (187-162-31-110.static.axtel.net [187.162.31.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14FAA2070B; Mon, 27 Jul 2020 22:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595890705; bh=qSmrTtFXENPcWfK3gi2Tfbj7Z60T+4LO1JAiAhLjHLc=; h=Date:From:To:Cc:Subject:From; b=uHrAkH+etwMd5dOBjtq9zpxyOVgoZJv/lNznqLCuC7MBA+QDWTYW8qkY2Oc2uGaTK uYKVg2XoBNLDIvypGozmBEpNSwXYnCD5t69lVjA2N7r5jFNrTG7H5PsXkUZYE3uhFE LzLE5+QwsHNIKN9zR77fGJzLlg5OoTUan6hv7TZI= Date: Mon, 27 Jul 2020 18:04:18 -0500 From: "Gustavo A. R. Silva" To: Coly Li , Kent Overstreet Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH v2][next] bcache: Use fallthrough pseudo-keyword Message-ID: <20200727230418.GA14028@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-bcache-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Add missing semicolon. drivers/md/bcache/journal.c | 2 +- drivers/md/bcache/util.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 77fbfd52edcf..c1227bdb57e7 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -608,7 +608,7 @@ static void do_journal_discard(struct cache *ca) ca->sb.njournal_buckets; atomic_set(&ja->discard_in_flight, DISCARD_READY); - /* fallthrough */ + fallthrough; case DISCARD_READY: if (ja->discard_idx == ja->last_idx) diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c index 62fb917f7a4f..ae380bc3992e 100644 --- a/drivers/md/bcache/util.c +++ b/drivers/md/bcache/util.c @@ -33,27 +33,27 @@ int bch_ ## name ## _h(const char *cp, type *res) \ case 'y': \ case 'z': \ u++; \ - /* fall through */ \ + fallthrough; \ case 'e': \ u++; \ - /* fall through */ \ + fallthrough; \ case 'p': \ u++; \ - /* fall through */ \ + fallthrough; \ case 't': \ u++; \ - /* fall through */ \ + fallthrough; \ case 'g': \ u++; \ - /* fall through */ \ + fallthrough; \ case 'm': \ u++; \ - /* fall through */ \ + fallthrough; \ case 'k': \ u++; \ if (e++ == cp) \ return -EINVAL; \ - /* fall through */ \ + fallthrough; \ case '\n': \ case '\0': \ if (*e == '\n') \ -- 2.27.0