Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1709134imu; Sat, 26 Jan 2019 08:56:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN548O8azcP2TZUGk2eVgFVHcsPUfr3C/+yTsCPQHXOLNZQE5ABOa9MpDVfGBA9onKLvyGdY X-Received: by 2002:aa7:81d0:: with SMTP id c16mr15387453pfn.153.1548521775350; Sat, 26 Jan 2019 08:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548521775; cv=none; d=google.com; s=arc-20160816; b=iNP5DVfUBVpb9L7nGWzTcZbP3szjI+1xcBMFMsQTAz0tJOVvebZSxo/H6ksmynFkcV C/hZSNmLvukaA5Vj6Te44U2up+FUzDe5tmd5KLlY+gUV+j6KSSJbmcbqzAUCTyEAl0YM agbJRubJoVtRmQTgjVcjasVrZ/8y9BvYsXp0l17eQzjn4bRVNqZxl/xqgppZVcy7Fnaw LLN5e9VIsVC50oFfyTe9KcriM7+661ZN+XrxE7R/SxlCHAaaKDLIgH+jWZ65kGafwrEQ 3xCGSLLS8JYu0NUyq71TJGeh3CT/uBMwOFRb7dJPtVpcbSgZmzLzSQMNKJ3XDk82LN8R +NiQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ssT1fJ2tFaQgzen7uCPVgsnn+liFyCf8ZPhAcCxhA7E=; b=IJS+khtVnVB5/gUGlyxCRzflDJFylTs3QBCT1vaEwfGOU2hWbXTLRCZDOj4Y/Wvz28 A+yEUn3R4BD3pMybqb8hXvETKgrHEPeOtZtG80WCZtwJqYMj1l70wdPTsMD1l7/fTuUw nNbB5ryJDcm6beTyZQ6GrBpYCTDT6xpjdwNicC/znLoE+zOyncnliw703rjMJt96yZhC 2sVndL4TDmIoV5pEH5u+U//7wQtGEaIs7YavXWsK6+CEPLt75Ae1a2ZXF15f1QT1TIkB rBwYLqDQdZWBp5/ekcZN90xPommI9jkDOsEHI4CL791JGeWCcfgwqihyIeWjbPRTop+8 aJvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DGeHc5v5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o28si29217345pgm.238.2019.01.26.08.55.59; Sat, 26 Jan 2019 08:56:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=DGeHc5v5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726218AbfAZQym (ORCPT + 99 others); Sat, 26 Jan 2019 11:54:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:43172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfAZQyl (ORCPT ); Sat, 26 Jan 2019 11:54:41 -0500 Received: from bbrezillon (unknown [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66E9621872; Sat, 26 Jan 2019 16:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548521681; bh=U97JhAc67TlIoQxUSKMiEuA/BMeDSBdzpp3PIvkto18=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DGeHc5v5OwpsLrtBKuw5LKAZtnbOM1h3gUlVB+JpQVIoI9ZFI388RiN1YZs2GYCUc NH1xt5YrV0NkoLod8XeOTNgAUbQM66STTm60psyzC9xptsRDww83fVfCdNNjACkiOa k87uIPS9qbh24NlaJ9ZDpSTWSCC5Bxu3pFRuRvlo= Date: Sat, 26 Jan 2019 17:54:29 +0100 From: Boris Brezillon To: "Gustavo A. R. Silva" Cc: Kees Cook , Wan ZongShun , Richard Weinberger , linux-kernel@vger.kernel.org, Marek Vasut , Kyungmin Park , linux-mtd@lists.infradead.org, Miquel Raynal , Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] mtd: rawnand: mark expected switch fall-throughs Message-ID: <20190126175429.65e6bfd8@bbrezillon> In-Reply-To: <853a267c-807b-c613-6662-93730a0b4c33@embeddedor.com> References: <20190125210950.GA27855@embeddedor> <20190126105208.221a2051@bbrezillon> <853a267c-807b-c613-6662-93730a0b4c33@embeddedor.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > > >> case 0: > >> break; > >> default: > > Thanks > -- > Gustavo > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/