diff mbox series

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

Message ID 1536091214-8037-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/3] linux-gen: sysinfo: return 0 if hugepages are not supported | expand

Commit Message

Github ODP bot Sept. 4, 2018, 8 p.m. 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: e9faf7a05e0ad39aa6fc47d412584fd97d85c724
 **/
 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) {