From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756232AbcC2IH1 (ORCPT ); Tue, 29 Mar 2016 04:07:27 -0400 Received: from down.free-electrons.com ([37.187.137.238]:44567 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756205AbcC2IHX (ORCPT ); Tue, 29 Mar 2016 04:07:23 -0400 Date: Tue, 29 Mar 2016 10:07:16 +0200 From: Boris Brezillon To: Peter Pan Cc: Brian Norris , David Woodhouse , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, karlzhang@micron.com, beanhuo@micron.com, xuejiancheng@huawei.com, Peter Pan Subject: Re: [PATCH 05/11] mtd: nand: use new BBT API instead of old ones Message-ID: <20160329100716.187b0bcc@bbrezillon> In-Reply-To: References: <1457923684-13505-1-git-send-email-peterpandong@micron.com> <1457923684-13505-6-git-send-email-peterpandong@micron.com> <20160325095120.640afc2c@bbrezillon> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; 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, 28 Mar 2016 16:12:08 +0800 Peter Pan wrote: > On Fri, Mar 25, 2016 at 4:51 PM, Boris Brezillon > wrote: > > On Mon, 14 Mar 2016 02:47:58 +0000 > > Peter Pan wrote: > > > >> Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt()) > >> exist temporarily. > >> > >> Signed-off-by: Brian Norris > >> Signed-off-by: Peter Pan > >> --- > >> drivers/mtd/nand/docg4.c | 7 +- > >> drivers/mtd/nand/nand_base.c | 151 ++++++++++++++++++++++++++++++++++++++++--- > >> include/linux/mtd/nand.h | 15 ++++- > >> 3 files changed, 160 insertions(+), 13 deletions(-) > >> > >> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > >> index b6facac..6f0e3b9 100644 > >> --- a/drivers/mtd/nand/nand_base.c > >> +++ b/drivers/mtd/nand/nand_base.c > > > > [...] > > > >> +static int nand_default_bbt(struct mtd_info *mtd) > >> +{ > >> + struct nand_chip *chip = mtd_to_nand(mtd); > >> + struct nand_bbt *nand_bbt = NULL; > >> + struct nand_chip_layout_info *info = > >> + kzalloc(sizeof(struct nand_chip_layout_info), GFP_KERNEL); > > > > No, this should be directly embedded in nand_chip, and should replace > > the numchips/chipsize/... fields declared in there. > > As I said in patch 2, I keep it like this temporarily. Will embedded it in > struct nand_chip later. Hm, I don't like the idea of duplicating the same information in two different places, just because we don't want to touch NAND drivers/core code. I'll have a look, and if it's not too invasive (not sure we have that much code using those fields), I'd prefer having them patched right now... -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com