Re: [PATCH] mtd: tests: remove useless checks

From: Jonas Gorski
Date: Sat Sep 02 2023 - 06:33:03 EST


Hi,

On Fri, 1 Sept 2023 at 15:39, Dembskiy Igor <dii@xxxxxxxxxx> wrote:
>
> Return value of mtdtest_scan_for_bad_() is always 0. So it causes senseless

Your function name got cut off.

> checks in some functions such as mtd_subpagetest_init().

Then maybe it should return void?

> Fixes: 084db4b020c7 ("mtd: tests: introduce helper functions")
> Signed-off-by: Dembskiy Igor <dii@xxxxxxxxxx>
> ---
> drivers/mtd/tests/oobtest.c | 2 --
> drivers/mtd/tests/pagetest.c | 2 --
> drivers/mtd/tests/readtest.c | 2 --
> drivers/mtd/tests/speedtest.c | 3 +--
> drivers/mtd/tests/stresstest.c | 2 --
> drivers/mtd/tests/subpagetest.c | 2 --
> drivers/mtd/tests/torturetest.c | 2 --
> 7 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
> index 13fed398937e..976f40a5656e 100644
> --- a/drivers/mtd/tests/oobtest.c
> +++ b/drivers/mtd/tests/oobtest.c
> @@ -399,8 +399,6 @@ static int __init mtd_oobtest_init(void)
> pr_info("test 1 of 5\n");
>
> err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
> - if (err)
> - goto out;

That's not mtdtest_scan_for_bad_eraseblocks().

Regards,
Jonas