perf/ring_buffer: Modify the parameter type of perf_mmap_free_page()

In perf_mmap_free_page(), the unsigned long type is converted to the
pointer type, but where the call is made, the pointer type is converted
to the unsigned long type. There is no need to do these operations.

Modify the parameter type of perf_mmap_free_page() to pointer type.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <jolsa@redhat.co>
Cc: <acme@kernel.org>
Cc: <mingo@redhat.com>
Cc: <mark.rutland@arm.com>
Cc: <namhyung@kernel.org>
Cc: <alexander.shishkin@linux.intel.com>
Link: https://lkml.kernel.org/r/e6ae3f0c-d04c-50f9-544a-aee3b30330cd@huawei.com
This commit is contained in:
Yunfeng Ye 2019-10-14 16:14:59 +08:00 committed by Peter Zijlstra
parent da97e18458
commit 8a9f91c51e

View File

@ -799,9 +799,9 @@ fail:
return NULL;
}
static void perf_mmap_free_page(unsigned long addr)
static void perf_mmap_free_page(void *addr)
{
struct page *page = virt_to_page((void *)addr);
struct page *page = virt_to_page(addr);
page->mapping = NULL;
__free_page(page);
@ -811,9 +811,9 @@ void rb_free(struct ring_buffer *rb)
{
int i;
perf_mmap_free_page((unsigned long)rb->user_page);
perf_mmap_free_page(rb->user_page);
for (i = 0; i < rb->nr_pages; i++)
perf_mmap_free_page((unsigned long)rb->data_pages[i]);
perf_mmap_free_page(rb->data_pages[i]);
kfree(rb);
}