]> Git Repo - J-u-boot.git/commit
spl: nand: sunxi: fix second case of modulo by zero error
authorMiquel Raynal <[email protected]>
Wed, 28 Feb 2018 19:51:45 +0000 (20:51 +0100)
committerMaxime Ripard <[email protected]>
Tue, 3 Apr 2018 10:10:55 +0000 (12:10 +0200)
commita0a984e14a41bf07f6b3f563a2a8bd22c03aea3a
tree7e25350441ac7648cc159064c15e1cec164d504a
parentf3aff376892a5af55a090d29e53e10391f886d80
spl: nand: sunxi: fix second case of modulo by zero error

In the nand_read_buffer() step, the seed is calculated by doing a modulo
by conf->nseeds which is always zero when not using the randomizer (most
of SLC NANDs).

This situation turns out to lead to a run time freeze with certain
toolchains.

Derive this seed only when the randomizer is enabled (and conf->nseeds
logically not zero), exactly like what has been done before with an
identical situation, see commit ea3f750c73e3 ("nand: sunxi: Fix modulo
by zero error").

Signed-off-by: Miquel Raynal <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
drivers/mtd/nand/sunxi_nand_spl.c
This page took 0.035344 seconds and 4 git commands to generate.