Received: by 10.223.164.202 with SMTP id h10csp384424wrb; Wed, 8 Nov 2017 18:50:14 -0800 (PST) X-Google-Smtp-Source: ABhQp+ROZqWIsATxPJ3RVAEQ/gLAUNzA3y5LwfSetvahz6msY+Alj0ZgUoMwfAuB8lGJ0OwRXMxs X-Received: by 10.99.67.71 with SMTP id q68mr2415484pga.163.1510195814246; Wed, 08 Nov 2017 18:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510195814; cv=none; d=google.com; s=arc-20160816; b=qIKt0oOYsbauycB+rXL4WjxPQJWt+2IrABWZTT5iadjQY4yd2BuYOvmVjqvZ9A1lsx gEYL5aW5/NM/muLedsrH4oBF9SKiGqjZBGaYQV6lJXSuQYc2VG65veGunSZbb1gnfZvF B9C3iT0DONAQocqplJPzXnsxW2B+gf0mK1j08nmsWB09ZSKuES/G2wDOOZr1X5gfA/rI wnb2iaJI9IrUO2QrGLB5jd6HXZ+zFurYXODZjlPJHBwIXUmJ7YuG/LVF85IyS9Kg/Itj 676hc7ZCtsmgDaO+5cX4wKdztKxLR6fqoyWC0E5DDXoZPquIyjpK62p5EO8XNF/R+sTb mPOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=ghtCDoFzjiZR9pvUPiXTV9617AGsc/kZU2oK7zyt31Y=; b=YO+yqGmRJjOj18iUEhPLgRQBnRxgD7Xjb0804Da3D3IgzGmcKjmtET8ELWUQVaoa0T XG7pRJARCHuI/PgmJERh4RMK4o0axEB9S3VbswDuBQkHWzb80ACZ0nEgKckJFZxCiGoC ryjdthKi+hDR3Fj9w+yI9p1w6Kd9SFmWthZdVncCtI+c1n59Rldhoq2M2iTbOi3+lYSr e/Ih65fs5RD437Vwz8E7MPXw9izB8ueMpNOKTEvgj0sPg9BGtMnD8Nboetu4kLS3H/nW LkYA/VWuoy6nZwmndTwP/O23Kv2dtBX91ltU+f/bsOe+2yla4e/Z/G1hhWm3zjX3dRSP HkhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si5256051pli.321.2017.11.08.18.50.01; Wed, 08 Nov 2017 18:50:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751886AbdKICtY (ORCPT + 82 others); Wed, 8 Nov 2017 21:49:24 -0500 Received: from gateway32.websitewelcome.com ([192.185.145.182]:18473 "EHLO gateway32.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbdKICtX (ORCPT ); Wed, 8 Nov 2017 21:49:23 -0500 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 814B35686D8 for ; Wed, 8 Nov 2017 20:49:22 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id CcuAeh7Pt5b6TCcuAeutSd; Wed, 08 Nov 2017 20:49:22 -0600 Received: from [189.175.248.21] (port=34342 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1eCcu9-001D79-LU; Wed, 08 Nov 2017 20:49:22 -0600 Date: Wed, 8 Nov 2017 20:49:19 -0600 From: "Gustavo A. R. Silva" To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] NFS: super: mark expected switch fall-throughs Message-ID: <20171109024919.GA11083@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.248.21 X-Source-L: No X-Exim-ID: 1eCcu9-001D79-LU X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.175.248.21]:34342 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 703509 Addresses-Coverity-ID: 703510 Addresses-Coverity-ID: 703511 Addresses-Coverity-ID: 703512 Addresses-Coverity-ID: 703513 Signed-off-by: Gustavo A. R. Silva --- fs/nfs/super.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index c9d24ba..da19c72 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1456,18 +1456,21 @@ static int nfs_parse_mount_options(char *raw, switch (token) { case Opt_xprt_udp6: protofamily = AF_INET6; + /* fall through */ case Opt_xprt_udp: mnt->flags &= ~NFS_MOUNT_TCP; mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; break; case Opt_xprt_tcp6: protofamily = AF_INET6; + /* fall through */ case Opt_xprt_tcp: mnt->flags |= NFS_MOUNT_TCP; mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP; break; case Opt_xprt_rdma6: protofamily = AF_INET6; + /* fall through */ case Opt_xprt_rdma: /* vector side protocols to TCP */ mnt->flags |= NFS_MOUNT_TCP; @@ -1494,11 +1497,13 @@ static int nfs_parse_mount_options(char *raw, switch (token) { case Opt_xprt_udp6: mountfamily = AF_INET6; + /* fall through */ case Opt_xprt_udp: mnt->mount_server.protocol = XPRT_TRANSPORT_UDP; break; case Opt_xprt_tcp6: mountfamily = AF_INET6; + /* fall through */ case Opt_xprt_tcp: mnt->mount_server.protocol = XPRT_TRANSPORT_TCP; break; @@ -1988,9 +1993,9 @@ static int nfs23_validate_mount_data(void *options, args->version = NFS_DEFAULT_VERSION; switch (data->version) { case 1: - data->namlen = 0; + data->namlen = 0; /* fall through */ case 2: - data->bsize = 0; + data->bsize = 0; /* fall through */ case 3: if (data->flags & NFS_MOUNT_VER3) goto out_no_v3; @@ -1998,11 +2003,14 @@ static int nfs23_validate_mount_data(void *options, memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE); /* Turn off security negotiation */ extra_flags |= NFS_MOUNT_SECFLAVOUR; + /* fall through */ case 4: if (data->flags & NFS_MOUNT_SECFLAVOUR) goto out_no_sec; + /* fall through */ case 5: memset(data->context, 0, sizeof(data->context)); + /* fall through */ case 6: if (data->flags & NFS_MOUNT_VER3) { if (data->root.size > NFS3_FHSIZE || data->root.size == 0) -- 2.7.4 From 1583557414861159454@xxx Thu Nov 09 03:27:15 +0000 2017 X-GM-THRID: 1583557414861159454 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread