diff mbox series

[v2,1/2] linux-gen: sysinfo: return 0 if hugepages are not supported

Message ID 1536062407-7301-2-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v2,1/2] linux-gen: sysinfo: return 0 if hugepages are not supported | expand

Commit Message

Github ODP bot Sept. 4, 2018, noon UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Per API return 0 from odp_sys_huge_page_size_all() if hugepages are not
supported/detected.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 693 (lumag:fix-cpu_max_hz)
 ** https://github.com/Linaro/odp/pull/693
 ** Patch: https://github.com/Linaro/odp/pull/693.patch
 ** Base sha: 0a5d67beda902557056d5b5146d8cbe86e5001b0
 ** Merge commit sha: e81a26cbc48048931817e90079842e469b3191c0
 **/
 platform/linux-generic/odp_system_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index bca02ba14..2ac8b32bb 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -443,7 +443,7 @@  int odp_sys_huge_page_size_all(uint64_t size[], int num)
 	dir = opendir("/sys/kernel/mm/hugepages");
 	if (!dir) {
 		ODP_ERR("Failed to open huge page directory\n");
-		return -1;
+		return 0;
 	}
 
 	while ((entry = readdir(dir)) != NULL) {