Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3249374imu; Mon, 28 Jan 2019 01:14:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN66fTBgymMJh38YmHlfH+tuHLfzbEeVbH1+Tx4TzgLk8oWVRJuK0n1SmWw6POv5mjGIAL+w X-Received: by 2002:a63:a112:: with SMTP id b18mr19216551pgf.440.1548666871828; Mon, 28 Jan 2019 01:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548666871; cv=none; d=google.com; s=arc-20160816; b=fP9y0UYdNidKa25an3CRmwynOFnrlJ3gjq4mW7fL9wO5G0JZSK4oyE5kFtM06WEmRz R46jdGkP2cnNLWhvvxXf8xlEj61CoLSUKtiuNTk65y9EzbeMP1A10obq6akk9uyP517K X2av0AOZD0HHo3PNpLQNbZ8yCGQGE0ow4nGly/Tomm7e9fDRRmJZl+D2mar06z5nBAMH K7GZ22fZ0vqGSBYnSODnosxfHi13vSDrcaj86CMyPLsz1mrffsT3mZISPfTCKWwpz7kj RCFZH9APhyYTad9ydVzEbZ3P8ELGq4qRizb+7NkKVsRLuzEUnoBAJNYqi0cSZ5os2lQw IeQA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=GvJ15VR3YBZzsk4ijLcGVPzWE5REPCQhD9IywDq0vG4=; b=vP3N33KWQ3JfqkimQGTFzV/QHZ64Wm3lgSBx/aSWrKkggqoFaAmB6Deoh+xtqG3VWv sdzgT7TzjFt6jlopLowMkPZE7tWAKAPiJE9bXRjaN6vT/Yt7JuvwONbQwCauujojO379 cr4i9ye+zsAMVmmnx1vio0GfWsTWvIj2zKcMVf7QYvrSUxvgdO1ZZgL9xk0wDOxLFLPt xlFMFKPuo3zRLXQHC0Z7EWmKg+awD413tMBPXjLNx6FkwJB5yTS9oo2NdzPomME8rZcr pRp1zEKXD9WFMOyvT+P261LO9gcE0mQLY+sPwswepaIXmrMrBsoZNURtOxh2crL423mx /iVg== 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 z71si31763315pgd.490.2019.01.28.01.14.16; Mon, 28 Jan 2019 01:14:31 -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 S1726735AbfA1JNt convert rfc822-to-8bit (ORCPT + 99 others); Mon, 28 Jan 2019 04:13:49 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:57947 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbfA1JNt (ORCPT ); Mon, 28 Jan 2019 04:13:49 -0500 X-Originating-IP: 90.88.29.206 Received: from xps13 (aaubervilliers-681-1-87-206.w90-88.abo.wanadoo.fr [90.88.29.206]) (Authenticated sender: miquel.raynal@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 754C740007; Mon, 28 Jan 2019 09:13:45 +0000 (UTC) Date: Mon, 28 Jan 2019 10:13:44 +0100 From: Miquel Raynal To: Boris Brezillon Cc: "Gustavo A. R. Silva" , Kees Cook , Wan ZongShun , Richard Weinberger , linux-kernel@vger.kernel.org, Marek Vasut , Kyungmin Park , linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] mtd: rawnand: mark expected switch fall-throughs Message-ID: <20190128101344.1cc03eed@xps13> In-Reply-To: <20190126175429.65e6bfd8@bbrezillon> References: <20190125210950.GA27855@embeddedor> <20190126105208.221a2051@bbrezillon> <853a267c-807b-c613-6662-93730a0b4c33@embeddedor.com> <20190126175429.65e6bfd8@bbrezillon> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, Boris Brezillon wrote on Sat, 26 Jan 2019 17:54:29 +0100: > On Sat, 26 Jan 2019 07:48:50 -0600 > "Gustavo A. R. Silva" wrote: > > > Hey Boris, > > > > On 1/26/19 3:52 AM, Boris Brezillon wrote: > > > On Fri, 25 Jan 2019 15:09:50 -0600 > > > "Gustavo A. R. Silva" wrote: > > > > > >> diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c > > >> index 933d1a629c51..d33e15dc4cdc 100644 > > >> --- a/drivers/mtd/nand/raw/nandsim.c > > >> +++ b/drivers/mtd/nand/raw/nandsim.c > > >> @@ -2251,9 +2251,10 @@ static int __init ns_init_module(void) > > >> > > >> switch (bbt) { > > >> case 2: > > >> - chip->bbt_options |= NAND_BBT_NO_OOB; > > >> + chip->bbt_options |= NAND_BBT_NO_OOB; > > >> + /* fall through */ > > >> case 1: > > >> - chip->bbt_options |= NAND_BBT_USE_FLASH; > > >> + chip->bbt_options |= NAND_BBT_USE_FLASH; > > > > > > You miss a '/* fall through */' here. > > > > > > > Not really. Notice that in this case the code falls through > > to a break statement. > > Still find it weird to mandate fall through comments in all cases but > this one... Yes please, even if there is no GCC warning I think you can add one here. Thanks, Miquèl