| Submitter | Simon Glass |
|---|---|
| Date | Dec. 26, 2012, 6:57 p.m. |
| Message ID | <1356548233-5570-19-git-send-email-sjg@chromium.org> |
| Download | mbox | patch |
| Permalink | /patch/208186/ |
| State | Superseded, archived |
| Delegated to: | Simon Glass |
| Headers | show |
Comments
On Wed, Dec 26, 2012 at 10:57 AM, Simon Glass <sjg@chromium.org> wrote: > 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> Applied to x86/master. > --- > common/cmd_mem.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-)
Patch
diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 701157d..f83acdf 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -36,6 +36,10 @@ #include <watchdog.h> #include <asm/io.h> +#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. @@ -636,11 +640,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 = NULL; /* yes, this is address 0x0, not NULL */ -#endif static const ulong bitpattern[] = { 0x00000001, /* single bit */ 0x00000003, /* two adjacent bits */
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> --- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)