summaryrefslogtreecommitdiffstats
path: root/commands/memtest.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-09-17 22:03:43 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-19 09:31:16 +0200
commit5e131c5905265c2060836864557fe51198627dea (patch)
treeb2f82985b905e0879d3e5934aee93df829ecb01f /commands/memtest.c
parent589bbbeccdc574d4c964d3f404a2e0605a545a4e (diff)
downloadbarebox-5e131c5905265c2060836864557fe51198627dea.tar.gz
memtest: Make use of resource_size()
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/memtest.c')
-rw-r--r--commands/memtest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/memtest.c b/commands/memtest.c
index 403ab91..dc8f7db 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -36,8 +36,7 @@ static int do_test_one_area(struct mem_test_resource *r, int bus_only,
printf("Testing memory space: %pa -> %pa:\n",
&r->r->start, &r->r->end);
- remap_range((void *)r->r->start, r->r->end -
- r->r->start + 1, cache_flag);
+ remap_range((void *)r->r->start, resource_size(r->r), cache_flag);
ret = mem_test_bus_integrity(r->r->start, r->r->end);
if (ret < 0)