Fix mtest indenting

Some of the inner loops are not indented correctly. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
master
Simon Glass 12 years ago
parent 51209b1f42
commit 7ecbd4d708
  1. 14
      common/cmd_mem.c

@ -673,14 +673,13 @@ static ulong mem_test_alt(vu_long *start, vu_long *end)
* pattern and ~pattern). * pattern and ~pattern).
*/ */
addr = start; addr = start;
for (j = 0; j < sizeof(bitpattern) / sizeof(bitpattern[0]); for (j = 0; j < sizeof(bitpattern) / sizeof(bitpattern[0]); j++) {
j++) {
val = bitpattern[j]; val = bitpattern[j];
for (; val != 0; val <<= 1) { for (; val != 0; val <<= 1) {
*addr = val; *addr = val;
*dummy = ~val; /* clear the test data off the bus */ *dummy = ~val; /* clear the test data off the bus */
readback = *addr; readback = *addr;
if(readback != val) { if (readback != val) {
printf("FAILURE (data line): " printf("FAILURE (data line): "
"expected %08lx, actual %08lx\n", "expected %08lx, actual %08lx\n",
val, readback); val, readback);
@ -718,7 +717,7 @@ static ulong mem_test_alt(vu_long *start, vu_long *end)
/* /*
* Address line test * Address line test
*
* Description: Test the address bus wiring in a * Description: Test the address bus wiring in a
* memory region by performing a walking * memory region by performing a walking
* 1's test on the relevant bits of the * 1's test on the relevant bits of the
@ -728,7 +727,7 @@ static ulong mem_test_alt(vu_long *start, vu_long *end)
* stuck-low, and shorted pins. The base * stuck-low, and shorted pins. The base
* address and size of the region are * address and size of the region are
* selected by the caller. * selected by the caller.
*
* Notes: For best results, the selected base * Notes: For best results, the selected base
* address should have enough LSB 0's to * address should have enough LSB 0's to
* guarantee single address bit changes. * guarantee single address bit changes.
@ -784,8 +783,9 @@ static ulong mem_test_alt(vu_long *start, vu_long *end)
for (offset = 1; offset < len; offset <<= 1) { for (offset = 1; offset < len; offset <<= 1) {
temp = start[offset]; temp = start[offset];
if ((temp != pattern) && (offset != test_offset)) { if ((temp != pattern) && (offset != test_offset)) {
printf("\nFAILURE: Address bit stuck low or shorted @" printf("\nFAILURE: Address bit stuck low or"
" 0x%.8lx: expected 0x%.8lx, actual 0x%.8lx\n", " shorted @ 0x%.8lx: expected 0x%.8lx,"
" actual 0x%.8lx\n",
(ulong)&start[offset], pattern, temp); (ulong)&start[offset], pattern, temp);
errs++; errs++;
if (ctrlc()) { if (ctrlc()) {

Loading…
Cancel
Save