[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1401098701-24049-7-git-send-email-heesub.shin@samsung.com>
Date: Mon, 26 May 2014 19:04:59 +0900
From: Heesub Shin <heesub.shin@...sung.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: John Stultz <john.stultz@...aro.org>,
Rebecca Schultz Zavin <rebecca@...roid.com>,
Colin Cross <ccross@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Mitchel Humpherys <mitchelh@...eaurora.org>,
Daeseok Youn <daeseok.youn@...il.com>,
Sunghwan Yun <sunghwan.yun@...sung.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Heesub Shin <heesub.shin@...sung.com>
Subject: [PATCH 7/9] staging: ion: remove order argument from free_buffer_page()
Not that the pages returned from the pool are compound pages, we do not
need to pass the order information to free_buffer_page().
Signed-off-by: Heesub Shin <heesub.shin@...sung.com>
---
drivers/staging/android/ion/ion_system_heap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index f0ae210..d78d589e 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -77,9 +77,9 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
}
static void free_buffer_page(struct ion_system_heap *heap,
- struct ion_buffer *buffer, struct page *page,
- unsigned int order)
+ struct ion_buffer *buffer, struct page *page)
{
+ unsigned int order = compound_order(page);
bool cached = ion_buffer_cached(buffer);
if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) {
@@ -169,7 +169,7 @@ free_table:
kfree(table);
free_pages:
list_for_each_entry_safe(page, tmp_page, &pages, lru)
- free_buffer_page(sys_heap, buffer, page, compound_order(page));
+ free_buffer_page(sys_heap, buffer, page);
return -ENOMEM;
}
@@ -189,8 +189,7 @@ static void ion_system_heap_free(struct ion_buffer *buffer)
ion_heap_buffer_zero(buffer);
for_each_sg(table->sgl, sg, table->nents, i)
- free_buffer_page(sys_heap, buffer, sg_page(sg),
- get_order(sg->length));
+ free_buffer_page(sys_heap, buffer, sg_page(sg));
sg_free_table(table);
kfree(table);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists