lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAyFORLq1bEubyug-10qy7GeNwP5V7VW0bLrDtpnsCE3D_tz_g@mail.gmail.com>
Date:	Thu, 7 Jan 2016 14:04:08 +0800
From:	Peter Pan <peterpansjtu@...il.com>
To:	Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:	Brian Norris <computersforpeace@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Frans Klaver <fransklaver@...il.com>,
	Peter Pan <peterpandong@...ron.com>, beanhuo@...ron.com,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
	karlzhang@...ron.com
Subject: Re: [PATCH v2 08/12] mtd: nand_bbt: remove struct nand_chip from nand_bbt.c

On Wed, Jan 6, 2016 at 11:16 PM, Boris Brezillon
<boris.brezillon@...e-electrons.com> wrote:
> On Tue, 15 Dec 2015 05:59:34 +0000
> Peter Pan <peterpansjtu@...il.com> wrote:
>
>> From: Brian Norris <computersforpeace@...il.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@...il.com>
>> Signed-off-by: Peter Pan <peterpandong@...ron.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ