From patchwork Thu Feb 4 10:07:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 8218121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CAE5DBEEE5 for ; Thu, 4 Feb 2016 10:37:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0E36202F8 for ; Thu, 4 Feb 2016 10:37:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C710020221 for ; Thu, 4 Feb 2016 10:37:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRHGV-0004BW-Hy; Thu, 04 Feb 2016 10:35:55 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRGqT-0005QV-TR; Thu, 04 Feb 2016 10:09:08 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 9B875494C; Thu, 4 Feb 2016 11:08:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost.localdomain (AToulouse-657-1-20-139.w83-193.abo.wanadoo.fr [83.193.84.139]) by mail.free-electrons.com (Postfix) with ESMTPSA id 28B684207; Thu, 4 Feb 2016 11:07:53 +0100 (CET) From: Boris Brezillon To: David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org Subject: [PATCH v2 50/51] mtd: nand: kill the ecc->layout field Date: Thu, 4 Feb 2016 11:07:13 +0100 Message-Id: <1454580434-32078-51-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454580434-32078-1-git-send-email-boris.brezillon@free-electrons.com> References: <1454580434-32078-1-git-send-email-boris.brezillon@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160204_020902_655936_0A5D6F5E X-CRM114-Status: GOOD ( 15.75 ) X-Spam-Score: -2.3 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mips@linux-mips.org, Krzysztof Kozlowski , Stefan Agner , linux-sunxi@googlegroups.com, punnaiah choudary kalluri , Robert Jarzmik , devel@driverdev.osuosl.org, Boris Brezillon , linux-samsung-soc@vger.kernel.org, Chen-Yu Tsai , Kukjin Kim , Ezequiel Garcia , Haojian Zhuang , linux-arm-kernel@lists.infradead.org, Priit Laes , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Josh Wu , Kyungmin Park , Maxime Ripard , Daniel Mack MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that all NAND drivers have switch to mtd_ooblayout_ops, we can kill the ecc->layout field. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nand_base.c | 8 -------- drivers/mtd/nand/nand_bch.c | 9 --------- include/linux/mtd/nand.h | 2 -- 3 files changed, 19 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index e4dc62b..9f6b7609 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -4161,13 +4161,6 @@ int nand_scan_tail(struct mtd_info *mtd) chip->oob_poi = chip->buffers->databuf + mtd->writesize; /* - * Set the provided ECC layout. If ecc->layout is NULL, the MTD core - * will just leave mtd->ooblayout to NULL, if it's not NULL, it will - * set ->ooblayout to the default ecclayout wrapper. - */ - mtd_set_ecclayout(mtd, ecc->layout); - - /* * If no default placement scheme is given, select an appropriate one. */ if (!mtd->ooblayout && (ecc->mode != NAND_ECC_SOFT_BCH)) { @@ -4412,7 +4405,6 @@ int nand_scan_tail(struct mtd_info *mtd) mtd->writebufsize = mtd->writesize; /* propagate ecc info to mtd_info */ - mtd_set_ecclayout(mtd, ecc->layout); mtd->ecc_strength = ecc->strength; mtd->ecc_step_size = ecc->size; /* diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c index e29e75f..ca9b2a4 100644 --- a/drivers/mtd/nand/nand_bch.c +++ b/drivers/mtd/nand/nand_bch.c @@ -158,15 +158,6 @@ struct nand_bch_control *nand_bch_init(struct mtd_info *mtd) eccsteps = mtd->writesize/eccsize; - /* - * Rely on the default ecclayout to ooblayout wrapper provided by MTD - * core if ecc.layout is not NULL. - * FIXME: this should be removed when all callers have moved to the - * mtd_ooblayout_ops approach. - */ - if (nand->ecc.layout) - mtd_set_ecclayout(mtd, nand->ecc.layout); - /* if no ecc placement scheme was provided, build one */ if (!mtd->ooblayout) { diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 82a005a..fdcc2b8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -466,7 +466,6 @@ struct nand_hw_control { * @prepad: padding information for syndrome based ECC generators * @postpad: padding information for syndrome based ECC generators * @options: ECC specific options (see NAND_ECC_XXX flags defined above) - * @layout: ECC layout control struct pointer * @priv: pointer to private ECC control data * @hwctl: function to control hardware ECC generator. Must only * be provided if an hardware ECC is available @@ -516,7 +515,6 @@ struct nand_ecc_ctrl { int prepad; int postpad; unsigned int options; - struct nand_ecclayout *layout; void *priv; void (*hwctl)(struct mtd_info *mtd, int mode); int (*calculate)(struct mtd_info *mtd, const uint8_t *dat,