lkml.org 
[lkml]   [2018]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages
From
Date
Hi Greg,

JFYI, I have rebase this patchset to v4.15-rc1.[1]

[1] https://lkml.org/lkml/2018/2/12/204

Thanks
Yisheng

On 2018/2/7 11:59, Yisheng Xie wrote:
> 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,
>

\
 
 \ /
  Last update: 2018-02-12 12:42    [W:0.066 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site