]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: marvell: prevent harmless warnings
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 7 Sep 2018 14:29:54 +0000 (16:29 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 10 Sep 2018 13:12:50 +0000 (15:12 +0200)
commit3f47ab5d67700038d0560d5b4e6c9f938e7854cc
tree9384f2ccca916afa5cda84e85892a1aadb99893f
parentd9cd171e36a0a756e2d44073ffb1adf94fb7ed60
mtd: rawnand: marvell: prevent harmless warnings

Since the addition of WARN_ON() in nand_subop_get_data/addr_len()
helpers, this driver will produce harmless warnings (mostly at probe)
just because it always calls the nand_subop_get_data_len() helper in
the parsing function (even on non-data instructions, where this value
is meaningless and unneeded).

Fix these warnings by deriving the length only when it is relevant.

Fixes: b52110b32013 ("mtd: rawnand: make subop helpers return unsigned values")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/marvell_nand.c