diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-07 09:25:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-07 09:25:56 +0100 |
commit | 7dd3401d034079dd04b41c36299e617290d0bcd6 (patch) | |
tree | 9cdca646504029e1ec49f578bacdfe69041b8bcd /commands | |
parent | 74213ed9a70f26a141ca3797e34c64f88a5cf090 (diff) | |
parent | 6a9481b28e460d2f5ebfecf8b368145e6803b67e (diff) | |
download | barebox-7dd3401d034079dd04b41c36299e617290d0bcd6.tar.gz barebox-7dd3401d034079dd04b41c36299e617290d0bcd6.tar.xz |
Merge branch 'for-next/ppc'
Diffstat (limited to 'commands')
-rw-r--r-- | commands/memtest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/memtest.c b/commands/memtest.c index c82badc951..a71576eeb9 100644 --- a/commands/memtest.c +++ b/commands/memtest.c @@ -88,11 +88,11 @@ static int request_memtest_regions(struct list_head *list) * remember last used element */ start = PAGE_ALIGN(bank->res->start); - end = PAGE_ALIGN_DOWN(r->start) - 1; - size = end - start + 1; + end = PAGE_ALIGN_DOWN(r->start); r_prev = r; - if (start >= end) + if (start == end) continue; + size = end - start; ret = alloc_memtest_region(list, start, size); if (ret < 0) @@ -103,12 +103,12 @@ static int request_memtest_regions(struct list_head *list) * Between used regions */ start = PAGE_ALIGN(r_prev->end); - end = PAGE_ALIGN_DOWN(r->start) - 1; - size = end - start + 1; + end = PAGE_ALIGN_DOWN(r->start); r_prev = r; if (start >= end) continue; + size = end - start; ret = alloc_memtest_region(list, start, size); if (ret < 0) return ret; |