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]
Date:	Tue, 20 Jan 2015 06:15:14 +0000
From:	Peter Pan 潘栋 (peterpandong) 
	<peterpandong@...ron.com>
To:	Brian Norris <computersforpeace@...il.com>
CC:	"dwmw2@...radead.org" <dwmw2@...radead.org>,
	Ezequiel Garcia <ezequiel.garcia@...tec.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	Qi Wang 王起 (qiwang) <qiwang@...ron.com>,
	Frank Liu 刘群 (frankliu) 
	<frankliu@...ron.com>,
	Melanie Zhang 张燕 (melaniezhang) 
	<melaniezhang@...ron.com>
Subject: RE: [PATCH 0/3] An alternative to SPI NAND

> On Thu, Jan 08, 2015 at 12:47:24AM +0000, Peter Pan 潘栋 (peterpandong)
> wrote:
> > Documentation/devicetree/bindings/mtd/spi-nand.txt |   22 +
> > drivers/mtd/Kconfig                                |    2 +
> > drivers/mtd/Makefile                               |    1 +
> > drivers/mtd/spi-nand/Kconfig                       |    7 +
> > drivers/mtd/spi-nand/Makefile                      |    3 +
> > drivers/mtd/spi-nand/spi-nand-base.c               | 2034
> ++++++++++++++++++++
> > drivers/mtd/spi-nand/spi-nand-bbt.c                | 1279
> ++++++++++++
> 
> I can already tell by the diffstat that I don't like this. We probably
> don't need 3000 new lines of code for this, but we especially don't
> want
> to duplicate nand_bbt.c. It won't take a lot of work to augment
> nand_bbt.c to make it shareable. (I can whip that patch up if needed.)

Qi Wang and I have started to work on make nand_bbt.c shareable.
nand_bbt.c need some member of nand_chip. Like what you said, if we want
to remove nand_chip from nand_bbt.c, "We'd just need to parameterize a few
relevant device details into a new nand_bbt struct, rather than using
struct nand_chip directly."

We can put struct nand_bbt pointer in either nand_chip or mtd_info structure.
If put nand_bbt in nand_chip, we need to change the parameter of nand_chip->scan_bbt
function from mtd_info to nand_bbt. Using nand_bbt struct will cause some member
in both nand_chip and nand_bbt struct.

Brain, do you have any suggest about this?
> 
> I'll still take a look at the rest of the code eventually, but just
> wanted to give my 2 cents up front.
> 
> > drivers/mtd/spi-nand/spi-nand-device.c             |  281 +++
> > include/linux/mtd/spi-nand.h                       |  317 +++
> > 9 files changed, 3946 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/mtd/spi-nand.txt
> > create mode 100644 drivers/mtd/spi-nand/Kconfig
> > create mode 100644 drivers/mtd/spi-nand/Makefile
> > create mode 100644 drivers/mtd/spi-nand/spi-nand-base.c
> > create mode 100644 drivers/mtd/spi-nand/spi-nand-bbt.c
> > create mode 100644 drivers/mtd/spi-nand/spi-nand-device.c
> > create mode 100644 include/linux/mtd/spi-nand.h
> 
> Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ