summaryrefslogtreecommitdiffstats
path: root/common/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 /common/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 'common/memtest.c')
-rw-r--r--common/memtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/memtest.c b/common/memtest.c
index 5c96d46..44ddedd 100644
--- a/common/memtest.c
+++ b/common/memtest.c
@@ -131,8 +131,8 @@ void mem_test_release_regions(struct list_head *list)
/*
* Ensure to leave with a cached on non used sdram regions.
*/
- remap_range((void *)r->r->start, r->r->end -
- r->r->start + 1, MAP_DEFAULT);
+ remap_range((void *)r->r->start, resource_size(r->r),
+ MAP_DEFAULT);
release_sdram_region(r->r);
free(r);