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] [thread-next>] [day] [month] [year] [list]
Message-ID: <57653FB8.2060006@nod.at>
Date:	Sat, 18 Jun 2016 14:34:00 +0200
From:	Richard Weinberger <richard@....at>
To:	Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	linux-mtd@...ts.infradead.org, Hans de Goede <hdegoede@...hat.com>,
	linux-kernel@...r.kernel.org, Aleksei Mamlin <mamlinav@...il.com>
Subject: Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific
 initialization/detection steps



Am 18.06.2016 um 13:34 schrieb Boris Brezillon:
> On Sat, 18 Jun 2016 11:23:01 +0200
> Richard Weinberger <richard@....at> wrote:
> 
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index 55f3ab8..aadebe7 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3703,6 +3703,10 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
>>
>>  	chip->manufacturer.ops = nand_manuf_ids[maf_idx].ops;
>>
>> +	if (!chip->manufacturer.ops)
>> +		/* assign no operations */
>> +		chip->manufacturer.ops = nand_manuf_ids[0].ops;
>> +
> 
> BTW, this is wrong, the manufacturer id code is not the index of the
> nand_manuf_ids[] table ;). If we go for this option, we should probably
> declare no_ops in nand_base.c and assign it here:
> 

Oh, yes. You are right.
Anyway, I think having a wrapper is also a good solution.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ