Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303312
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Pan <peterpansjtu@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 08/12] mtd: nand_bbt: remove struct nand_chip from nand_bbt.c |
| Date | Thu, 07 Jan 2016 07:10:02 +0100 |
| Message-ID | <qObVM-43d-3@gated-at.bofh.it> (permalink) |
| References | <qFQY9-bO-3@gated-at.bofh.it> <qFQYb-bO-21@gated-at.bofh.it> <qNY2u-2RR-7@gated-at.bofh.it> |
| X-Original-To | Boris Brezillon <boris.brezillon@free-electrons.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=twoEBagcNokTiIvbDFFiHuR5Q18Kq+4/92GVpQg5l48=; b=UdCGrFFCSWEZPE2fHYiI1lACNVvV+Bzn14xoaqBRhCS/GwKrn9wNZrfSsMTFIegC3K /s3d3m3BoUs2rDxt1st6t1HXSc6pGpC1EgN5o72UPRhp4Q93rgWwwsz20SskK9OAoDuw QNX3Cbfke+cMCc491fyABXeoyrRESp58lc35ywbRS/4PsRz4V6z/3hCSlnXsb9tF9n2K AAJRepZupeyojZpnWHcu502cYvqT1dgmVm4uach80i48XTCOEjkebgjEXgXpZjpediGA WmUPq4kL+DeJRIuy4yIK/0G21fCvHEkHtXSL4676alnvfmvCUw/ePGosF5XA5Ys7oxAu 1/dQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.25.167.208 with SMTP id q199mr14489024lfe.61.1452146648698; Wed, 06 Jan 2016 22:04:08 -0800 (PST) |
| Content-Type | text/plain; charset=UTF-8 |
| 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 | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Brian Norris <computersforpeace@gmail.com>, David Woodhouse <dwmw2@infradead.org>, Frans Klaver <fransklaver@gmail.com>, Peter Pan <peterpandong@micron.com>, beanhuo@micron.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, karlzhang@micron.com |
| X-Original-Date | Thu, 7 Jan 2016 14:04:08 +0800 |
| X-Original-Message-ID | <CAAyFORLq1bEubyug-10qy7GeNwP5V7VW0bLrDtpnsCE3D_tz_g@mail.gmail.com> |
| X-Original-References | <1450159178-29895-1-git-send-email-peterpandong@micron.com> <1450159178-29895-9-git-send-email-peterpandong@micron.com> <20160106161635.61b5400f@bbrezillon> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1303312 |
Show key headers only | View raw
On Wed, Jan 6, 2016 at 11:16 PM, Boris Brezillon
<boris.brezillon@free-electrons.com> wrote:
> On Tue, 15 Dec 2015 05:59:34 +0000
> Peter Pan <peterpansjtu@gmail.com> wrote:
>
>> From: Brian Norris <computersforpeace@gmail.com>
>>
>> This commit contains most of modification. But the job is quite
>> simple --- replace struct nand_chip with struct nand_bbt. There
>> is no algorithm change, just replacement.
>>
>> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
>> Signed-off-by: Peter Pan <peterpandong@micron.com>
>> ---
>> drivers/mtd/nand/nand_bbt.c | 391 ++++++++++++++++++++++----------------------
>> 1 file changed, 193 insertions(+), 198 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
>> index a5c8ab5..b46b4ae 100644
>> --- a/drivers/mtd/nand/nand_bbt.c
>> +++ b/drivers/mtd/nand/nand_bbt.c
>
> [...]
>
>> /**
>> * nand_scan_bbt - [NAND Interface] scan, find, read and maybe create bad block table(s)
>> - * @mtd: MTD device structure
>> + * @bbt: NAND BBT structure
>> *
>> * The function checks, if a bad block table(s) is/are already available. If
>> * not it scans the device for manufacturer marked good / bad blocks and writes
>> @@ -1000,21 +1000,21 @@ static void verify_bbt_descr(struct mtd_info *mtd, struct nand_bbt_descr *bd)
>> * The bad block table memory is allocated here. It must be freed by calling
>> * the nand_free_bbt function.
>> */
>> -static int nand_scan_bbt(struct mtd_info *mtd)
>> +static int nand_scan_bbt(struct nand_bbt *bbt)
>> {
>> - struct nand_chip *this = mtd_to_nand(mtd);
>> - int len, res;
>> + struct mtd_info *mtd = bbt->mtd;
>> + int len, res = 0;
>> uint8_t *buf;
>> - struct nand_bbt_descr *td = this->bbt_td;
>> - struct nand_bbt_descr *md = this->bbt_md;
>> + struct nand_bbt_descr *td = bbt->bbt_td;
>> + struct nand_bbt_descr *md = bbt->bbt_md;
>>
>> len = (mtd->size >> (this->bbt_erase_shift + 2)) ? : 1;
>
> 'this' is gone, which generates a compilation error.
>
> len = (mtd->size >> (bbt->bbt_erase_shift + 2)) ? : 1;
Fix this in v3
>
>
> --
> Boris Brezillon, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
Thanks
Peter Pan
--
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 | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v2 08/12] mtd: nand_bbt: remove struct nand_chip from nand_bbt.c Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-06 16:20 +0100 Re: [PATCH v2 08/12] mtd: nand_bbt: remove struct nand_chip from nand_bbt.c Peter Pan <peterpansjtu@gmail.com> - 2016-01-07 07:10 +0100
csiph-web