]> 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)
commitfc3eab8d0e73035fc7a1d757fd2692d1e3c2b3e2
tree19a4df260d55971146f321acc76a83432ba0f6fe
parent23a820732f31ded3afc4f513e8fd47c823cdaefb
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