public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 3/4] cmd: mem: Use IS_ENABLED instead of alt_test variable
Date: Thu,  5 Mar 2020 07:21:31 +0100	[thread overview]
Message-ID: <20200305062132.22932-3-sr@denx.de> (raw)
In-Reply-To: <20200305062132.22932-1-sr@denx.de>

This patch uses the IS_ENABLED() macro to check, which mtest variant
is enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
---
 cmd/mem.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/cmd/mem.c b/cmd/mem.c
index f519adaee2..2ccc7032ad 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -875,11 +875,6 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
 	ulong errs = 0;	/* number of errors, or -1 if interrupted */
 	ulong pattern = 0;
 	int iteration;
-#if defined(CONFIG_SYS_ALT_MEMTEST)
-	const int alt_test = 1;
-#else
-	const int alt_test = 0;
-#endif
 
 	start = CONFIG_SYS_MEMTEST_START;
 	end = CONFIG_SYS_MEMTEST_END;
@@ -921,7 +916,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
 
 		printf("Iteration: %6d\r", iteration + 1);
 		debug("\n");
-		if (alt_test) {
+		if (IS_ENABLED(CONFIG_SYS_ALT_MEMTEST)) {
 			errs = mem_test_alt(buf, start, end, dummy);
 		} else {
 			errs = mem_test_quick(buf, start, end, pattern,
-- 
2.25.1

  parent reply	other threads:[~2020-03-05  6:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05  6:21 [PATCH 1/4] cmd: mem: Correctly count the errors in mtest Stefan Roese
2020-03-05  6:21 ` [PATCH 2/4] cmd: mem: Drop eldk-4.2 workaround and use cast in unmap_sysmem() Stefan Roese
2020-04-21 12:26   ` Tom Rini
2020-03-05  6:21 ` Stefan Roese [this message]
2020-04-21 12:26   ` [PATCH 3/4] cmd: mem: Use IS_ENABLED instead of alt_test variable Tom Rini
2020-03-05  6:21 ` [PATCH 4/4] cmd: mem: Add bitflip memory test to alternate mtest Stefan Roese
2020-04-21 12:26   ` Tom Rini
2020-09-09  1:33   ` [PATCH] cmd: mem: fix range of bitflip test Ralph Siemsen
2020-09-09  8:49     ` Stefan Roese
2020-09-09 13:02       ` [PATCH v2] " Ralph Siemsen
2020-09-09 13:35         ` Stefan Roese
2020-09-09 15:21         ` [PATCH v3] " Ralph Siemsen
2020-09-09 15:30           ` Stefan Roese
2020-09-09 15:42             ` [PATCH v4] " Ralph Siemsen
2020-09-09 16:10             ` [PATCH v5] " Ralph Siemsen
2020-09-10  5:09               ` Stefan Roese
2020-09-19 12:34               ` Tom Rini
2020-09-09 13:06       ` [PATCH] " Ralph Siemsen
2020-09-09 13:34         ` Stefan Roese
2020-09-09 13:49           ` Ralph Siemsen
2020-09-09 13:53             ` Stefan Roese
2020-09-09 15:07               ` Ralph Siemsen
2020-09-09 15:13                 ` Stefan Roese
2020-09-09 15:17                   ` Ralph Siemsen
2020-04-21 12:26 ` [PATCH 1/4] cmd: mem: Correctly count the errors in mtest Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200305062132.22932-3-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox