]> asedeno.scripts.mit.edu Git - linux.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)
commit21a268069203cc72d1b2990bc68386516fabc274
tree9384f2ccca916afa5cda84e85892a1aadb99893f
parent11da3a7f84f19c26da6f86af878298694ede0804
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: 760c435e0f85 ("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