From: Yisheng Xie <xieyisheng1@huawei.com>
To: Laura Abbott <labbott@redhat.com>, <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free
Date: Wed, 7 Feb 2018 08:57:02 +0800 [thread overview]
Message-ID: <3e68a118-0d6f-2a42-0df1-3b0021ce5ca7@huawei.com> (raw)
In-Reply-To: <a8c0aec1-5e90-ccbf-01bb-bb6d12281035@redhat.com>
Hi Laura,
On 2018/2/7 7:11, Laura Abbott wrote:
> On 02/06/2018 03:10 PM, Laura Abbott wrote:
>> 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.
>>
>
> Nevermind, just saw the follow up patch. Both of them:
>
> Acked-by: Laura Abbott <labbott@redhat.com>
Thanks.
If you do not mind, I will send out another two cleanup patchs:
cleanup ion_page_pool_alloc_pages() and combine cache/uncache pools into one pools.
Thanks
>
>>> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.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)
>>>
>>
>
>
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-02-07 0:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 3:26 Yisheng Xie
2018-02-05 3:26 ` [PATCH 2/2] staging: android: ion: Return void instead of int Yisheng Xie
2018-02-06 23:10 ` [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free Laura Abbott
2018-02-06 23:11 ` Laura Abbott
2018-02-07 0:57 ` Yisheng Xie [this message]
2018-02-12 11:40 ` Yisheng Xie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e68a118-0d6f-2a42-0df1-3b0021ce5ca7@huawei.com \
--to=xieyisheng1@huawei.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®