mtd: nand: Optimize checking of erased buffers
authorPavel Machek <pavel@ucw.cz>
Fri, 21 Apr 2017 10:51:07 +0000 (12:51 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 1 Jun 2017 08:09:24 +0000 (10:09 +0200)
commit086567f12e1188c57e061a53825a5eff5a7923a0
tree1430eed25ed4cda67cd6bbb73d94b8c4b0c96270
parent838ff7b333263abc9e7e026bb225ed66511f450f
mtd: nand: Optimize checking of erased buffers

If we see ~0UL in flash, there's no need for hweight, and no need to
check number of bitflips. So this should be net win.

Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c