lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6286ae0a-f439-3477-91bb-8df0e454b98e@redhat.com>
Date:   Tue, 6 Feb 2018 15:10:30 -0800
From:   Laura Abbott <labbott@...hat.com>
To:     Yisheng Xie <xieyisheng1@...wei.com>, gregkh@...uxfoundation.org
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: android: ion: Remove dead code in
 ion_page_pool_free

On 02/04/2018 07:26 PM, Yisheng Xie wrote:
> ion_page_pool_add will always return 0, however ion_page_pool_free will
> call ion_page_pool_free_pages when ion_page_pool_add's return value is
> not 0, so it is a dead code which can be removed.
> 

Can you clean up ion_page_pool_add to be a void return as well?
No sense in having it just always return 0.

> Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
> ---
>   drivers/staging/android/ion/ion_page_pool.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
> index 4452e28..150626f 100644
> --- a/drivers/staging/android/ion/ion_page_pool.c
> +++ b/drivers/staging/android/ion/ion_page_pool.c
> @@ -79,13 +79,9 @@ struct page *ion_page_pool_alloc(struct ion_page_pool *pool)
>   
>   void ion_page_pool_free(struct ion_page_pool *pool, struct page *page)
>   {
> -	int ret;
> -
>   	BUG_ON(pool->order != compound_order(page));
>   
> -	ret = ion_page_pool_add(pool, page);
> -	if (ret)
> -		ion_page_pool_free_pages(pool, page);
> +	ion_page_pool_add(pool, page);
>   }
>   
>   static int ion_page_pool_total(struct ion_page_pool *pool, bool high)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ