]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: denali: Avoid using ecc->code_buf as a temporary buffer
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 5 Dec 2017 11:09:28 +0000 (12:09 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 14 Dec 2017 12:34:22 +0000 (13:34 +0100)
commit9aaa82eacda683f6f9d14952db135e4033599d37
tree19a4df260d55971146f321acc76a83432ba0f6fe
parent2ee5eceb8a785c6f5363602d8ab33151e894d7ec
mtd: nand: denali: Avoid using ecc->code_buf as a temporary buffer

ECC bytes are contiguous in the ->oob_poi buffer, which means we don't
have to copy them into ->code_buf (here used as a temporary buffer)
before passing them to the nand_check_erased_ecc_chunk() function.

This change will allow us to allocate ecc->{code,calc}_buf only when
ecc->calculate() or ecc->correct() is specified.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mtd/nand/denali.c