Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp413304imu; Fri, 25 Jan 2019 04:38:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN7AMFaIg4bwxEdwoi0GaJWgKa9HvTwymib/JUbRi9rLxPCyZNnig1KyqaliaKkWMQUzJQNQ X-Received: by 2002:a63:6cc8:: with SMTP id h191mr9497695pgc.366.1548419926274; Fri, 25 Jan 2019 04:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548419926; cv=none; d=google.com; s=arc-20160816; b=R2M1XJOthcoeI9imwi5TJd8F+Nha9DFNhqs/Ch6uhaF/hmLQ9jtJeGUnpXYe2AvUko iZhvGLW2XKD9kHXYYv05RPWSVfl4sfeWwoWNJWmCHwpjbjpdMrVcGRTUAMdiy9x7bqWV tGb5MTcQAk7sH7Ys/eVIJXJFnWPb0V/wz+zFQ4QqjfamD4n80myLaMXWFzAkdGL13DbP YqGq2gLpHwDU9oAFzOR7WWAs4GxljphVO7JD9webmjG2Udj71DtQbg0JPslDFGUsnlwP SAh1Jid8c3Dp0UL/TkSlRQqY15/2YaScQEsJ72M9cQWqw+yEjK8bHmlAJ8Q9UQBUTfFV KEHQ== 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=GE/hjSy4e8ylWG6dlGQQ5ydVROpl4y3fD15T8EtvVoI=; b=V5+XRSInRA1y2RJ6RYH2NkzUt8QA9jWAVVHyhm46PID0bDlOvZOHmX7k/qf57XuR7G /dgikFzqqpaZ0Xj4vgdYDFtJ4WWjHb3ekId1HJ7f0GLSu7DND+u1vR5UYr1BPjAvmKwq kwWcIOr8R/Os8WETImXn73TcKFO27yLzJIVedRowyQ288K8Bpq5eXX/M4Kmspz1YbQyK CksDr3HT4fGIrEOtbqAAGwRZI3FrVzPcxGfZvUsbXqQqN1tA0isFznjZcV61U5Sfi+tu 18CdGjJ7Fvt0Kf7m0sKgPGkaULbRQxwcCxmrNXeUcbzIbA7yqXCEjZ7YyIavSu9dALOq Wt2Q== 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 v6si26054703pgv.277.2019.01.25.04.38.30; Fri, 25 Jan 2019 04:38:46 -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 S1728624AbfAYMgp convert rfc822-to-8bit (ORCPT + 99 others); Fri, 25 Jan 2019 07:36:45 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49232 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfAYMgo (ORCPT ); Fri, 25 Jan 2019 07:36:44 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 19116209BF; Fri, 25 Jan 2019 13:36:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from xps13 (aaubervilliers-681-1-87-206.w90-88.abo.wanadoo.fr [90.88.29.206]) by mail.bootlin.com (Postfix) with ESMTPSA id C4019207AD; Fri, 25 Jan 2019 13:36:31 +0100 (CET) Date: Fri, 25 Jan 2019 13:36:31 +0100 From: Miquel Raynal To: Mathieu Malaterre Cc: Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mtd: Annotate implicit fall through in nand_scan_tail Message-ID: <20190125133631.48a32268@xps13> In-Reply-To: <20190116195004.2499-2-malat@debian.org> References: <20190116195004.2499-1-malat@debian.org> <20190116195004.2499-2-malat@debian.org> 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 Mathieu, Mathieu Malaterre wrote on Wed, 16 Jan 2019 20:50:04 +0100: > There is a plan to build the kernel with -Wimplicit-fallthrough and > these places in the code produced warnings (W=1). > > This commit removes the following warnings: > > drivers/mtd/nand/raw/nand_base.c:5556:6: warning: this statement may fall through [-Wimplicit-fallthrough=] > drivers/mtd/nand/raw/nand_base.c:5575:6: warning: this statement may fall through [-Wimplicit-fallthrough=] > drivers/mtd/nand/raw/nand_base.c:5613:13: warning: this statement may fall through [-Wimplicit-fallthrough=] > > Signed-off-by: Mathieu Malaterre > --- > drivers/mtd/nand/raw/nand_base.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c > index cca4b24d2ffa..da344c276088 100644 > --- a/drivers/mtd/nand/raw/nand_base.c > +++ b/drivers/mtd/nand/raw/nand_base.c > @@ -5555,6 +5555,7 @@ static int nand_scan_tail(struct nand_chip *chip) > } > if (!ecc->read_page) > ecc->read_page = nand_read_page_hwecc_oob_first; > + /* fall through */ > > case NAND_ECC_HW: > /* Use standard hwecc read page function? */ > @@ -5574,6 +5575,7 @@ static int nand_scan_tail(struct nand_chip *chip) > ecc->read_subpage = nand_read_subpage; > if (!ecc->write_subpage && ecc->hwctl && ecc->calculate) > ecc->write_subpage = nand_write_subpage_hwecc; > + /* fall through */ > > case NAND_ECC_HW_SYNDROME: > if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) && > @@ -5611,6 +5613,7 @@ static int nand_scan_tail(struct nand_chip *chip) > ecc->size, mtd->writesize); > ecc->mode = NAND_ECC_SOFT; > ecc->algo = NAND_ECC_HAMMING; > + /* fall through */ > > case NAND_ECC_SOFT: > ret = nand_set_ecc_soft_ops(chip); Applied to nand/next with the subject prefix being "mtd: rawnand:" Thanks, Miquèl