Skip to content

RFC mtd_tests: Remove duplicate code and cleanups

Vikram Narayanan linux-mtd 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mtd_tests: Refactor duplicate codedrivers/mtd/tests/mtd_nandbiterrs.c drivers/mtd/tests/mtd_oobtest.c drivers/mtd/tests/mtd_pagetest.c +5 more+84 -2281 reply
2/8mtd_pagetest: Replace printk with pr_{info,crit}drivers/mtd/tests/mtd_pagetest.c+76 -760 replies
3/8mtd_torturetest: Replace printk with pr_{info,crit}drivers/mtd/tests/mtd_torturetest.c+37 -360 replies
4/8mtd_subpagetest: Replace printk with pr_infodrivers/mtd/tests/mtd_subpagetest.c+59 -590 replies
5/8mtd_stresstest: Replace printk with pr_{info,crit}drivers/mtd/tests/mtd_stresstest.c+20 -200 replies
6/8mtd_speedtest: Replace printk with pr_{info,crit}drivers/mtd/tests/mtd_speedtest.c+40 -400 replies
7/8mtd_readtest: Replace printk with pr_infodrivers/mtd/tests/mtd_readtest.c+21 -210 replies
8/8mtd_nandbiterrs: Replace msg macro with pr_infodrivers/mtd/tests/mtd_nandbiterrs.c+34 -340 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/8] mtd_tests: Remove duplicate code and cleanups
Cc Artem Bityutskiy <[email protected]>
Cc Brian Norris <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Iwo Mergler <[email protected]>

This RFC patchset moves some common code in all the tests to a common header file. Also, all the printk,PRINT_PREF are replaced with pr_info style prints. This way duplicates are eliminated and the code looks clean.

I deliberately missed out the mtd_oobtest as Brian Norris has already sent a patch for that.

All the patches are compile tested and checkpatch clean(No checkpatch warnings are introduced by the code that is added in this patch).

Vikram Narayanan(8):
mtd_tests: Refactor duplicate code
mtd_pagetest: Replace printk with pr_{info,crit}
mtd_torturetest: Replace printk with pr_{info,crit}
mtd_subpagetest: Replace printk with pr_info
mtd_stresstest: Replace printk with pr_{info,crit}
mtd_speedtest: Replace printk with pr_{info,crit}
mtd_readtest: Replace printk with pr_info
mtd_nandbiterrs: Replace msg macro with pr_info

 drivers/mtd/tests/mtd_nandbiterrs.c |   97 +++++++-----------
 drivers/mtd/tests/mtd_oobtest.c     |   31 +-----
 drivers/mtd/tests/mtd_pagetest.c    |  191 +++++++++++++++--------------------
 drivers/mtd/tests/mtd_readtest.c    |   42 ++++----
 drivers/mtd/tests/mtd_speedtest.c   |  140 ++++++++------------------
 drivers/mtd/tests/mtd_stresstest.c  |   71 ++++---------
 drivers/mtd/tests/mtd_subpagetest.c |  147 +++++++++++----------------
 drivers/mtd/tests/mtd_tests.h       |   60 +++++++++++
 drivers/mtd/tests/mtd_torturetest.c |  104 +++++++------------
 9 files changed, 370 insertions(+), 513 deletions(-)