Skip to contentSkip to conversation

cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not set

PATCH New Tom Rini 1 participant 2 messages Mar 12, 2013

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not set

mem_test_quick and mem_test_alt functions are only called by do_mem_mtest, so move them under the #ifdef

---
 common/cmd_mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/cmd_mem.c +1 -1
index 53572f7..64dd76a 100644
@@ -631,6 +631,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 #endif /* CONFIG_LOOPW */
 
+#ifdef CONFIG_CMD_MEMTEST
 static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
 			  vu_long *dummy)
 {
@@ -910,7 +911,6 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
 	return 0;
 }
 
-#ifdef CONFIG_CMD_MEMTEST
 /*
  * Perform a memory test. A more complete alternative test can be
  * configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not set

Quoted 4 lines · Tom Rini

mem_test_quick and mem_test_alt functions are only called by do_mem_mtest, so move them under the #ifdef

As I've build-tested this on arm (where a few platforms didn't have CONFIG_CMD_MTEST) and one of the PowerPC boards I also saw this on, applied to u-boot/master.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130312/56a9ce3f/attachment.pgp>