Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1256542

Re: [PATCH 2/5] mtd: nand: drop unnecessary partition parser data

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/5] mtd: nand: drop unnecessary partition parser data
Date Tue, 27 Oct 2015 09:00:01 +0100
Message-ID <qo7kJ-2vb-13@gated-at.bofh.it> (permalink)
References <qo2l3-7OT-3@gated-at.bofh.it> <qo2l3-7OT-1@gated-at.bofh.it>
X-Original-To Brian Norris <computersforpeace@gmail.com>
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 50
Organization linux.* mail to news gateway
X-Original-Cc <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Ezequiel Garcia <ezequiel.garcia@free-electrons.com>, Marek Vasut <marex@denx.de>, Scott Wood <scottwood@freescale.com>, Josh Wu <josh.wu@atmel.com>, Robert Jarzmik <robert.jarzmik@free.fr>, Kyungmin Park <kyungmin.park@samsung.com>, Han Xu <han.xu@freescale.com>, Huang Shijie <shijie.huang@arm.com>
X-Original-Date Tue, 27 Oct 2015 08:52:53 +0100
X-Original-Message-ID <20151027085253.34eebbaa@bbrezillon>
X-Original-References <1445913070-17950-1-git-send-email-computersforpeace@gmail.com> <1445913070-17950-3-git-send-email-computersforpeace@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1256542

Show key headers only | View raw


On Mon, 26 Oct 2015 19:31:07 -0700
Brian Norris <computersforpeace@gmail.com> wrote:

> All of these drivers set up a parser data struct just to communicate DT
> partition data. This field has been deprecated and is instead supported
> by telling nand_scan_ident() about the 'flash_node'.
> 
> This patch:
>  * sets chip->flash_node for those drivers that didn't already (but used
>    OF partitioning)

As mentioned in patch 1, I think we should get rid of the ->flash_node
field and directly set mtd->dev.of_node instead. If we want to hide
MTD internals we could provide this kind of helper:

static inline void mtd_set_of_node(struct mtd_device *mtd,
				   struct device_node *np)
{
	mtd->dev.of_node = np;
}

>  * drops the parser data
>  * switches to the simpler mtd_device_register() where possible, now
>    that we've eliminated one of the auxiliary parameters
> 
> Now that we've assigned chip->flash_node for these drivers, we can
> probably rely on nand_dt_init() to do more of the DT parsing for us, but
> for now, I don't want to fiddle with each of these drivers. The parsing
> is done in duplicate for now on some drivers. I don't think this should
> break things. (Famous last words.)
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

For the sunxi_nand driver

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Thanks,

Boris

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/5] mtd: nand: drop unnecessary partition parser data Brian Norris <computersforpeace@gmail.com> - 2015-10-27 03:40 +0100
  Re: [PATCH 2/5] mtd: nand: drop unnecessary partition parser data Boris Brezillon <boris.brezillon@free-electrons.com> - 2015-10-27 09:00 +0100
  Re: [PATCH 2/5] mtd: nand: drop unnecessary partition parser data Brian Norris <computersforpeace@gmail.com> - 2015-10-28 01:50 +0100

csiph-web