Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp121446pxy; Tue, 20 Apr 2021 14:17:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhWEuVLafRlyS9RJ1b9plOZT3Ijwldx/RXBE5pO5/+Ove6q3fe67Yg7PxYEcn47eGOWYw4 X-Received: by 2002:a63:520b:: with SMTP id g11mr18958343pgb.1.1618953477524; Tue, 20 Apr 2021 14:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618953477; cv=none; d=google.com; s=arc-20160816; b=tUFLTCXlP/AbKWmE0CNxY3J5i9BlaXo71u15tsuYVNr7e5M+MqtTjILFqPLzoShqga Zx4rOGiHvp36GvbbJ5M/Pi8ZGwAUYdMWM2e8HTg1Rs9orkzVOJytmjEEjxpcpmWBZdFE qur17qEnoznlnqNk1IyKBvVnzbEYsZmcHVVlheho/CZKOCDBrx1Wd83D7yyZ9acP6m6b 6NTNSuwEOI/Mk65zxErZhGgQ8ivFwmw0D+YnKlAYyWMdlRiz8EUuZtptoV2cSWZr0A6d 3rB0EOXZf6K8f3u7WV9plInZ0Eky2Gwdm/Dk9QH5tsk1irzCmnYMDQ5St+B8EIUgCvlF UVSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=5MZcRefNIP0RvOj5hnrzYM9wY6JM3LtFZWgnJDRY+3Q=; b=bd08cBmGhxh/d7md1oAKqKyRRLkU0Fnhx+9+5er5bKMrEImK0kY51XXsskSi026oHD +UBLDaMHVUCFzMRc3K2YeFb5QJ3IWClIpGmKA1F3O2rMDE0dsfXPNsAPd3B1RUAWQGMB O/2W2MH2HRWuG63xh87vgj/wDB/NU0V6SeCmesIkYAAsS9OTzlVZlVbSEspYC02qEMLJ rhflYiQ/xNDJ1lTdjOF/AWdDb++c8VTG2znR66U+tOQiC4tsVfNI7SZiU2OzOAf+QMqv Hi59prVEED+Z+Aj67zvXTshlTZoJSNn9sfr7JpxPI8+EC84CZ62/wjwajS5Qhq+HepoY /jEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fgj5CNdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si261355pgh.223.2021.04.20.14.17.26; Tue, 20 Apr 2021 14:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fgj5CNdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234119AbhDTVQd (ORCPT + 99 others); Tue, 20 Apr 2021 17:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:55270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233882AbhDTVQ3 (ORCPT ); Tue, 20 Apr 2021 17:16:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5F4D761076; Tue, 20 Apr 2021 21:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618953356; bh=An5dy6CsC1BMaoFOvaAgr9a1mexHuCaV5SCWxfkFBkQ=; h=Date:From:To:Cc:Subject:From; b=Fgj5CNdXiZ3UzLmLoq7lTDRz0fQ3dE7NUQUNbuZGcRBBX/az/+2IHD4/rLKd26jUD /AhyV4w1lMRXXjTMDDgYvRBVWPNssm5usY09j559RiYUsngHNXJpQRKO92lw+AmECY 4Oi5KiJJPCWX8LOf4tPAjYX8CsBXgU6V9O8N+bUMQQ47xl+77v3fA9PKN0e8ER9ybJ CRc4uYsHSW9d1Zmg0PmhTKfCSbicjiYMtDr1kISsnskZrFszvtalrYd3rz8qLfr7vl /CI2Od7Nc7HxeoUgSoqYf9FED5/CrA7qazr4B/rTG7pXVZ2ZdPMsESpEYFig7/6+uU 5j5cTK9VPq7rg== Date: Tue, 20 Apr 2021 16:16:15 -0500 From: "Gustavo A. R. Silva" To: David Howells Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH v2][next] afs: Fix fall-through warnings for Clang Message-ID: <20210420211615.GA51432@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keywords in places where the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Place blank line after the fallthrough markings, not before. Link: https://lore.kernel.org/linux-hardening/748935.1606147853@warthog.procyon.org.uk/ fs/afs/cmservice.c | 5 +++++ fs/afs/fsclient.c | 4 ++++ fs/afs/vlclient.c | 1 + 3 files changed, 10 insertions(+) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index a4e9e6e07e93..d3c6bb22c5f4 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -322,6 +322,8 @@ static int afs_deliver_cb_callback(struct afs_call *call) return ret; call->unmarshall++; + fallthrough; + case 5: break; } @@ -418,6 +420,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) r->node[loop] = ntohl(b[loop + 5]); call->unmarshall++; + fallthrough; case 2: break; @@ -530,6 +533,7 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) r->node[loop] = ntohl(b[loop + 5]); call->unmarshall++; + fallthrough; case 2: break; @@ -663,6 +667,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call) afs_extract_to_tmp(call); call->unmarshall++; + fallthrough; case 3: break; diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 2f695a260442..dd3f45d906d2 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@ -388,6 +388,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) req->file_size = vp->scb.status.size; call->unmarshall++; + fallthrough; case 5: break; @@ -1408,6 +1409,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) _debug("motd '%s'", p); call->unmarshall++; + fallthrough; case 8: break; @@ -1845,6 +1847,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) xdr_decode_AFSVolSync(&bp, &op->volsync); call->unmarshall++; + fallthrough; case 6: break; @@ -1979,6 +1982,7 @@ static int afs_deliver_fs_fetch_acl(struct afs_call *call) xdr_decode_AFSVolSync(&bp, &op->volsync); call->unmarshall++; + fallthrough; case 4: break; diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index dc9327332f06..00fca3c66ba6 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -593,6 +593,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call) if (ret < 0) return ret; call->unmarshall = 6; + fallthrough; case 6: break; -- 2.27.0