linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Yunfeng Ye" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Yunfeng Ye <yeyunfeng@huawei.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	<jolsa@redhat.co>, <acme@kernel.org>, <mingo@redhat.com>,
	<mark.rutland@arm.com>, <namhyung@kernel.org>,
	<alexander.shishkin@linux.intel.com>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	linux-kernel@vger.kernel.org
Subject: [tip: perf/core] perf/ring_buffer: Modify the parameter type of perf_mmap_free_page()
Date: Fri, 18 Oct 2019 12:48:09 -0000	[thread overview]
Message-ID: <157140288978.29376.16956109153818084888.tip-bot2@tip-bot2> (raw)
In-Reply-To: <e6ae3f0c-d04c-50f9-544a-aee3b30330cd@huawei.com>

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     8a9f91c51ea72b126864e0db616b1bac12261200
Gitweb:        https://git.kernel.org/tip/8a9f91c51ea72b126864e0db616b1bac12261200
Author:        Yunfeng Ye <yeyunfeng@huawei.com>
AuthorDate:    Mon, 14 Oct 2019 16:14:59 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 17 Oct 2019 21:31:55 +02:00

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
---
 kernel/events/ring_buffer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index ffb59a4..abc145c 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -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);
 }
 

      reply	other threads:[~2019-10-18 12:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27  8:22 [PATCH 1/2] perf/ring_buffer: Modify the parameter type of perf_mmap_free_page() Yunfeng Ye
2019-09-27  8:24 ` [PATCH 2/2] perf/ring_buffer: Matching the memory allocate and free, in rb_alloc() Yunfeng Ye
2019-10-14  8:15   ` Yunfeng Ye
2019-10-18 12:48     ` [tip: perf/core] " tip-bot2 for Yunfeng Ye
2019-10-14  8:14 ` [PATCH 1/2] perf/ring_buffer: Modify the parameter type of perf_mmap_free_page() Yunfeng Ye
2019-10-18 12:48   ` tip-bot2 for Yunfeng Ye [this message]

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=157140288978.29376.16956109153818084888.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=jolsa@redhat.co \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yeyunfeng@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).