summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorVinayak Menon <vinmenon@codeaurora.org>2015-10-30 15:06:04 +0530
committerJeevan Shriram <jshriram@codeaurora.org>2016-04-26 14:38:03 -0700
commitb6fb81015e3fd000ada78cb4d8d1d1dc75b82ee0 (patch)
treed97d354840b4a7687ac5cd30d0a30b7a89ce40a7 /mm/page_alloc.c
parent90d66b6f7175a3c4cfebaf674efeb2a499235740 (diff)
mm: fix compile time error with !CONFIG_CMA
Fixes compile time failures because of not protecting CMA related elements with CONFIG_CMA. Change-Id: I930b7c0ffdce0f1bfc4f8a582a698be16ed44d1f Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f54a84fb5e6e..cadce191d555 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1822,6 +1822,7 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order,
return page;
}
+#ifdef CONFIG_CMA
static struct page *__rmqueue_cma(struct zone *zone, unsigned int order)
{
struct page *page = 0;
@@ -1831,6 +1832,12 @@ static struct page *__rmqueue_cma(struct zone *zone, unsigned int order)
trace_mm_page_alloc_zone_locked(page, order, MIGRATE_CMA);
return page;
}
+#else
+static inline struct page *__rmqueue_cma(struct zone *zone, unsigned int order)
+{
+ return NULL;
+}
+#endif
/*
* Obtain a specified number of elements from the buddy allocator, all under