From patchwork Mon Jan 14 20:39:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 1024764 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SKrDWTjU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43dlj81gFBz9sCh for ; Tue, 15 Jan 2019 07:40:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbfANUkW (ORCPT ); Mon, 14 Jan 2019 15:40:22 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39915 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbfANUkV (ORCPT ); Mon, 14 Jan 2019 15:40:21 -0500 Received: by mail-wm1-f68.google.com with SMTP id y8so997112wmi.4; Mon, 14 Jan 2019 12:40:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Im+S4MYp2sak4c0j7sO7o1zps+bu02T7X9NGufahYS8=; b=SKrDWTjUa0uPlj2I6xJs/sTHqd8+wlpzX//qRmAJFHGtl43d1xb/xr7sPicxQ4+/2Q Vl9YAQn8M9Yaa7Hh/pphy10yChcyoco1fNBLll2zRX1/5AsdR3jYgH3t0PgdmEvEPjpc H3eoaZ+7b+nlSxhl5yUWPHRrGB7bsx36Lro5eayGTgCQirGimrhH1Qmhvnrd67j7NTYC YMQszqFj/TxLj8kNp9hSl+57CxF5J9qLaHGLJ8/OtC3dY03JnX1qbgtU1fp/6kp4hu0i 2+ISu2hZMWKv3xrSm16j4QC3P58QEBEZ5wZEipKUjwhOMsYWPB7zDBakwHGCVImQ8SI1 JiVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Im+S4MYp2sak4c0j7sO7o1zps+bu02T7X9NGufahYS8=; b=ES3VrY204xvNm+R0uvxmx8p92Pkm7IjSxrJINb0fQCYK5e07fe724+Tnim08BfnxBJ JL+Ej8FWNDMFU5RxiI/fHvZONtU2bjDPWzOsYASXxfO57L3rx/1sPY2Nk1pcODWGnXh4 L1/uf8bUBQDzvdXn0Xpp/hWu6NRXNkhRaLwnbIoyk3ne720ePeum7SLnIAPCXH9wxIOb TGifaRVkMAlkU/Gk8iXaYgY6U9Ct4ruBCmdEGY07icpA12Zzn0h/oxEQp+3lTiDEo/UN me//rY0dHfUhazmLFQdoRz2ILpiOiYRZ7wCzkP/TB3OVLubPoVDKoR2aMeVsCNZn0+tO XpcQ== X-Gm-Message-State: AJcUukcn2FSOP90H25AFVlDZQU3AD6wxwAsjsPDOJ9lrLAN4ZnYmCPNh 0JR0JPHB3bbjHJ5yaqc1Az8HH+61 X-Google-Smtp-Source: ALg8bN7zXTjwVkUMxnuCMyNekLrZjuJlU0/Oy+cvdnB/AbNN2LIa53d6EaRFJrJX2LK/WuZ1jgXRBg== X-Received: by 2002:a1c:4c0c:: with SMTP id z12mr636225wmf.17.1547498419660; Mon, 14 Jan 2019 12:40:19 -0800 (PST) Received: from macbookpro.malat.net ([2a01:e34:ee1e:860:6f23:82e6:aa2d:bbd1]) by smtp.gmail.com with ESMTPSA id d4sm19023824wmb.25.2019.01.14.12.40.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 12:40:19 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id CE59E11422D0; Mon, 14 Jan 2019 21:40:17 +0100 (CET) From: Mathieu Malaterre To: "Theodore Ts'o" Cc: Mathieu Malaterre , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ext4: annotate implicit fall throughs Date: Mon, 14 Jan 2019 21:39:44 +0100 Message-Id: <20190114203945.20233-2-malat@debian.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190114203945.20233-1-malat@debian.org> References: <20190114203945.20233-1-malat@debian.org> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings (W=1). Fix them up. This commit remove the following warnings: fs/ext4/indirect.c:1182:6: warning: this statement may fall through [-Wimplicit-fallthrough=] fs/ext4/indirect.c:1188:6: warning: this statement may fall through [-Wimplicit-fallthrough=] fs/ext4/indirect.c:1432:6: warning: this statement may fall through [-Wimplicit-fallthrough=] fs/ext4/indirect.c:1440:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre Reviewed-by: Andreas Dilger --- fs/ext4/indirect.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c index bf7fa1507e81..c2225f0d31b5 100644 --- a/fs/ext4/indirect.c +++ b/fs/ext4/indirect.c @@ -1183,18 +1183,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 */ 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 */ 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 */ case EXT4_TIND_BLOCK: ; } @@ -1433,6 +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 */ case EXT4_IND_BLOCK: if (++n >= n2) return 0; @@ -1441,6 +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 */ case EXT4_DIND_BLOCK: if (++n >= n2) return 0; @@ -1449,6 +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 */ case EXT4_TIND_BLOCK: ; }