]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: mtd_oobtest: Fix the address offset with vary_offset case
authorRoger Quadros <rogerq@ti.com>
Wed, 8 Jul 2015 11:50:19 +0000 (14:50 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 27 Aug 2015 23:30:01 +0000 (16:30 -0700)
commitfa0f4cea2f9b1821baa84b391db6a6d7b80c8d2d
tree9f8519b8d96a1e306159c95a23e0d01ea9a76c45
parentf359218e084d5959b57dcb2c03f2d6f247d2e607
mtd: mtd_oobtest: Fix the address offset with vary_offset case

When vary_offset is set (e.g. test case 3), the offset is not always
zero so memcmpshow() will show the wrong offset in the print message.
To fix this we introduce a new function memcmpshowoffset() which takes
offset as a parameter and displays the right offset and use it in
the case where offset is non zero.

The old memcmpshow() functionality is preserved by converting it into
a macro with offset preset to 0.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/tests/oobtest.c