Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4240915pxa; Mon, 10 Aug 2020 04:46:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaUKY+DmBi5C/u+OLnR56D/e0orCjmx13J7Ro9Z5Jlho3xhg6zA/y4037u2QNvNwjvOsWB X-Received: by 2002:a17:906:1f96:: with SMTP id t22mr20613014ejr.381.1597059987765; Mon, 10 Aug 2020 04:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597059987; cv=none; d=google.com; s=arc-20160816; b=PeX8R6RDFW+6q5dvNBb6gplI6RxoAda+kCGbJKtZWaxfbHyZ93XPmW3h6AkSjiBvk1 pfPr9S7NI+Nzu86mBlOD3YLkcma19WnpFlp+ys1ydBSUpsnUCxOEZyzVtt/a6u9dMzRw 4dXfGZNHfJPyTqB3EvqlgZUqEw4DoZPK7xMaD6sG3jLiiH8d9yf3ugNA97oGT6v7V3Aa 7o5age5YQaRqLFCM29QA4mFg+dIAH3kYKJoeeygZ8XQnfosqcOPfgK3h9+Hfca4+1kKX t1bgJArJDDENnXnpQE0YGJCPvq/V/eG7iw9jBqKY21Y8MA0iBPt+ujOOkD4cgpQ2sgkE pjOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k4cQb7Jl5oGhKjiYec6XLjTn9xcC1CcYVHJuWXVFMVo=; b=0Z5PikNKVuFWeUd6DsUTXGinR+zXraAJ/JcmTGKu/EmkHMjH0BoISXpFUMXOI6icu7 zPArHItlwgagRLK1JXPTkMxh4/3mT+oDBg6MFMryaUtlvm8ERNe/1ii/RJ3JpCsaKTfE AcO1CC2WeDyGga05erluuWWdIJpfMbus0Lm5y3uDTEXCBe65ERSDbKw2LxlcQ/NiPw77 pBvo1tx6YmFKwCgPOTUQnLNbh6BVKJC6BLzkvi9j75WBH4WMigUTkoiXJvv/3V9jQZ3M YYtlsUp0KzmCpsn2SK4TMTT23s2VO0OQuzGrdaYRsV8yDGcJ1avnOIJuJHeLlSyeMfzD PlGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si9950953edi.330.2020.08.10.04.45.55; Mon, 10 Aug 2020 04:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726146AbgHJLpv (ORCPT + 99 others); Mon, 10 Aug 2020 07:45:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47276 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726141AbgHJLpu (ORCPT ); Mon, 10 Aug 2020 07:45:50 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 23E60CAF2948679A61FF; Mon, 10 Aug 2020 19:45:49 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 10 Aug 2020 19:45:44 +0800 From: Shijie Luo To: CC: , , Subject: [PATCH] ext4: change to use fallthrough macro instead of fallthrough comments Date: Mon, 10 Aug 2020 07:44:35 -0400 Message-ID: <20200810114435.24182-1-luoshijie1@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Change to use fallthrough macro in switch case. Signed-off-by: Shijie Luo --- fs/ext4/hash.c | 4 ++-- fs/ext4/indirect.c | 12 ++++++------ fs/ext4/readpage.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c index 3e133793a5a3..2924261226e0 100644 --- a/fs/ext4/hash.c +++ b/fs/ext4/hash.c @@ -233,7 +233,7 @@ static int __ext4fs_dirhash(const char *name, int len, break; case DX_HASH_HALF_MD4_UNSIGNED: str2hashbuf = str2hashbuf_unsigned; - /* fall through */ + fallthrough; case DX_HASH_HALF_MD4: p = name; while (len > 0) { @@ -247,7 +247,7 @@ static int __ext4fs_dirhash(const char *name, int len, break; case DX_HASH_TEA_UNSIGNED: str2hashbuf = str2hashbuf_unsigned; - /* fall through */ + fallthrough; case DX_HASH_TEA: p = name; while (len > 0) { diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c index be2b66eb65f7..1217f0fdcb33 100644 --- a/fs/ext4/indirect.c +++ b/fs/ext4/indirect.c @@ -1182,21 +1182,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode) ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); i_data[EXT4_IND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_IND_BLOCK: nr = i_data[EXT4_DIND_BLOCK]; if (nr) { ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); i_data[EXT4_DIND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_DIND_BLOCK: nr = i_data[EXT4_TIND_BLOCK]; if (nr) { ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); i_data[EXT4_TIND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_TIND_BLOCK: ; } @@ -1436,7 +1436,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); i_data[EXT4_IND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_IND_BLOCK: if (++n >= n2) break; @@ -1445,7 +1445,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); i_data[EXT4_DIND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_DIND_BLOCK: if (++n >= n2) break; @@ -1454,7 +1454,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); i_data[EXT4_TIND_BLOCK] = 0; } - /* fall through */ + fallthrough; case EXT4_TIND_BLOCK: ; } diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index f2df2db0786c..f014c5e473a9 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -140,7 +140,7 @@ static void bio_post_read_processing(struct bio_post_read_ctx *ctx) return; } ctx->cur_step++; - /* fall-through */ + fallthrough; case STEP_VERITY: if (ctx->enabled_steps & (1 << STEP_VERITY)) { INIT_WORK(&ctx->work, verity_work); @@ -148,7 +148,7 @@ static void bio_post_read_processing(struct bio_post_read_ctx *ctx) return; } ctx->cur_step++; - /* fall-through */ + fallthrough; default: __read_end_io(ctx->bio); } -- 2.19.1