Move CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of file
authorSimon Glass <sjg@chromium.org>
Sun, 24 Feb 2013 17:33:29 +0000 (17:33 +0000)
committerChanho Park <chanho61.park@samsung.com>
Mon, 27 Jul 2015 01:21:39 +0000 (10:21 +0900)
This config effectively has a default value of 0, so add this setting
at the top of the code to remove an #ifdef in the C function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Conflicts:
common/cmd_mem.c

common/cmd_mem.c

index 71625e6a319894d11d5b8a38e5a5b575ff864f0f..08568afc280591018b29ad96036481506b99dc7b 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifndef CONFIG_SYS_MEMTEST_SCRATCH
+#define CONFIG_SYS_MEMTEST_SCRATCH 0
+#endif
+
 static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
 
 /* Display values from last command.
@@ -639,11 +643,7 @@ static ulong mem_test_alt(ulong start_addr, ulong end_addr)
        vu_long temp;
        vu_long anti_pattern;
        vu_long num_words;
-#if defined(CONFIG_SYS_MEMTEST_SCRATCH)
        vu_long *dummy = (vu_long *)CONFIG_SYS_MEMTEST_SCRATCH;
-#else
-       vu_long *dummy = 0;     /* yes, this is address 0x0, not NULL */
-#endif
        static const ulong bitpattern[] = {
                0x00000001,     /* single bit */
                0x00000003,     /* two adjacent bits */