From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbbJ0Hw5 (ORCPT ); Tue, 27 Oct 2015 03:52:57 -0400 Received: from down.free-electrons.com ([37.187.137.238]:59818 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750949AbbJ0Hw4 (ORCPT ); Tue, 27 Oct 2015 03:52:56 -0400 Date: Tue, 27 Oct 2015 08:52:53 +0100 From: Boris Brezillon To: Brian Norris Cc: , , Ezequiel Garcia , Marek Vasut , Scott Wood , Josh Wu , Robert Jarzmik , Kyungmin Park , Han Xu , Huang Shijie Subject: Re: [PATCH 2/5] mtd: nand: drop unnecessary partition parser data Message-ID: <20151027085253.34eebbaa@bbrezillon> In-Reply-To: <1445913070-17950-3-git-send-email-computersforpeace@gmail.com> References: <1445913070-17950-1-git-send-email-computersforpeace@gmail.com> <1445913070-17950-3-git-send-email-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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Oct 2015 19:31:07 -0700 Brian Norris 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 For the sunxi_nand driver Acked-by: Boris Brezillon Thanks, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com