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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 CE064C2D0E4 for ; Fri, 20 Nov 2020 23:18:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7AD3D2240C for ; Fri, 20 Nov 2020 23:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbgKTXS1 (ORCPT ); Fri, 20 Nov 2020 18:18:27 -0500 Received: from smtprelay0213.hostedemail.com ([216.40.44.213]:38790 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728359AbgKTXS0 (ORCPT ); Fri, 20 Nov 2020 18:18:26 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 9655D182CED2A; Fri, 20 Nov 2020 23:18:25 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: grade25_3d0ec972734f X-Filterd-Recvd-Size: 1719 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Fri, 20 Nov 2020 23:18:24 +0000 (UTC) Message-ID: <5e9c1d953c6b6254a3288f1e797064666e82a79d.camel@perches.com> Subject: Re: [PATCH 001/141] afs: Fix fall-through warnings for Clang From: Joe Perches To: "Gustavo A. R. Silva" , David Howells Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Date: Fri, 20 Nov 2020 15:18:23 -0800 In-Reply-To: <51150b54e0b0431a2c401cd54f2c4e7f50e94601.1605896059.git.gustavoars@kernel.org> References: <51150b54e0b0431a2c401cd54f2c4e7f50e94601.1605896059.git.gustavoars@kernel.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Fri, 2020-11-20 at 12:23 -0600, Gustavo A. R. Silva wrote: > 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. This is the first of the actual patches I've seen. I think adding fallthough for these patches isn't the best option. > diff --git 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; My preference would be to change these to break and not fallthrough; >   case 5: >   break; >   } etc...