All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages
@ 2018-02-07  3:59 Yisheng Xie
  2018-02-07  3:59 ` [PATCH 2/2] staging: android: ion: Combine cache and uncache pools Yisheng Xie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yisheng Xie @ 2018-02-07  3:59 UTC (permalink / raw)
  To: gregkh, labbott; +Cc: devel, Yisheng Xie, linux-kernel

ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page
pools. If alloc_pages return NULL, it will return NULL, or it will
return the pages allocate from alloc_pages. So we can just return
alloc_pages without any judgement.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
---
 drivers/staging/android/ion/ion_page_pool.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
index e3a6e32..6d2caf0 100644
--- a/drivers/staging/android/ion/ion_page_pool.c
+++ b/drivers/staging/android/ion/ion_page_pool.c
@@ -11,13 +11,9 @@
 
 #include "ion.h"
 
-static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool)
+static inline struct page *ion_page_pool_alloc_pages(struct ion_page_pool *pool)
 {
-	struct page *page = alloc_pages(pool->gfp_mask, pool->order);
-
-	if (!page)
-		return NULL;
-	return page;
+	return alloc_pages(pool->gfp_mask, pool->order);
 }
 
 static void ion_page_pool_free_pages(struct ion_page_pool *pool,
-- 
1.7.12.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-12 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07  3:59 [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages Yisheng Xie
2018-02-07  3:59 ` [PATCH 2/2] staging: android: ion: Combine cache and uncache pools Yisheng Xie
2018-02-07 14:34   ` Sumit Semwal
2018-02-08  0:53     ` Yisheng Xie
2018-02-07 14:35 ` [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages Sumit Semwal
2018-02-12 11:41 ` Yisheng Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.