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:	Thu, 12 Feb 2015 17:26:20 +0100
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Antoine Tenart <antoine.tenart@...e-electrons.com>
Cc:	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
	ezequiel.garcia@...e-electrons.com, jszhang@...vell.com,
	computersforpeace@...il.com, dwmw2@...radead.org,
	linux-arm-kernel@...ts.infradead.org,
	sebastian.hesselbarth@...il.com
Subject: Re: [PATCH 5/9] mtd: pxa3xx_nand: add support for the Marvell Berlin nand controller

Antoine Tenart <antoine.tenart@...e-electrons.com> writes:

>> All these ifs per variant will add complexity to the current driver, won't they
>> ?
>
> Given the current state of this driver I believe this would be a better
> idea to first rework it to use the nand framework properly. Then it will
> be possible to have a look on what we have, to decide whether or not a
> mrvl-nand-lib is needed.

I don't fully agree to delay.
You're taking code, making sometimes copy-paste, for the berlin specific
functions, and I think you're taking the bugs as well, which duplicates the fix
effort.

For example, in nand_cmdfunc_berlin():
+	if (info->reg_ndcr & NDCR_DWIDTH_M)
+		column /= 2;

This is I think a copy-paste from its twin nand_cmdfunc(). Now consider what
happens if the command is _not_ a read command, but an ONFI READID command
(ONFI being specified by column=0x20 if memory serves me well).

This is the reason I don't really like this patch. And this is also the reason
why I believe you're in a perfect timing to improve things, by grouping the
common function, and keeping the bugs in only one place, not many.

Cheers.

-- 
Robert
--
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