From: Steven Rostedt <rostedt@goodmis•org>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Masami Hiramatsu <mhiramat@kernel•org>,
Vincent Donnefort <vdonnefort@google•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: build warning after merge of the ftrace tree
Date: Wed, 15 May 2024 01:01:41 -0400 [thread overview]
Message-ID: <20240515010141.6457d409@rorschach.local.home> (raw)
In-Reply-To: <20240515004931.0d2e7af3@rorschach.local.home>
On Wed, 15 May 2024 00:49:31 -0400
Steven Rostedt <rostedt@goodmis•org> wrote:
> > kernel/trace/ring_buffer.c:6286:72: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
> > 6286 | struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]);
> > | ~~~~~~~~~~~~~~~~~~~~~~^~~
> > | |
> > | long unsigned int
> > include/asm-generic/memory_model.h:37:45: note: in definition of macro '__pfn_to_page'
> > 37 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
> > | ^~~
> > kernel/trace/ring_buffer.c:6286:37: note: in expansion of macro 'virt_to_page'
> > 6286 | struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]);
> > | ^~~~~~~~~~~~
> > arch/powerpc/include/asm/page.h:228:53: note: expected 'const void *' but argument is of type 'long unsigned int'
> > 228 | static inline unsigned long virt_to_pfn(const void *kaddr)
> > | ~~~~~~~~~~~~^~~~~
> >
> > Introduced by commit
> >
> > 117c39200d9d ("ring-buffer: Introducing ring-buffer mapping functions")
> >
> > My arm multi_v7_defconfig build produced a similar warning.
> >
> > Is this really intended for v6.10? It seems a bit late.
> >
>
> Well, I submitted this for the v6.9 merge window, and Linus had issues
> with it. So we've been tweaking it for the entire time and it was ready
> a bit earlier, but due to my vacation and traveling I missed pushing it
> to next. :-p
>
> Most the code has been well tested, but because it is late, I kept it
> as a separate topic branch in case Linus still isn't happy with it.
And it looks like one of the "tweaks" dropped a (void *) cast.
This should fixed it:
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a02c7a52a0f5..7345a8b625fb 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -6283,7 +6283,7 @@ static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer,
}
while (p < nr_pages) {
- struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]);
+ struct page *page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]);
int off = 0;
if (WARN_ON_ONCE(s >= nr_subbufs)) {
-- Steve
next prev parent reply other threads:[~2024-05-15 5:01 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 2:48 linux-next: build warning after merge of the ftrace tree Stephen Rothwell
2024-05-15 4:49 ` Steven Rostedt
2024-05-15 5:01 ` Steven Rostedt [this message]
2024-05-15 5:11 ` Stephen Rothwell
2024-05-15 5:13 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2025-07-11 8:38 Stephen Rothwell
2025-03-27 7:01 Stephen Rothwell
2025-03-27 8:07 ` Gabriele Monaco
2024-09-19 5:05 Stephen Rothwell
2024-09-24 22:34 ` Stephen Rothwell
2024-09-26 13:14 ` Steven Rostedt
2024-09-27 10:24 ` Jonathan Corbet
2024-09-27 18:11 ` Steven Rostedt
2024-09-28 1:15 ` Bagas Sanjaya
2023-06-23 4:35 Stephen Rothwell
2023-06-23 6:53 ` Donglin Peng
2022-11-25 3:10 Stephen Rothwell
2021-10-28 12:23 Stephen Rothwell
2021-10-28 13:16 ` Steven Rostedt
2021-10-28 21:10 ` Stephen Rothwell
2021-10-28 21:29 ` Kalesh Singh
2021-10-28 22:36 ` Stephen Rothwell
2021-10-28 21:30 ` Steven Rostedt
2021-10-25 23:35 Stephen Rothwell
2021-10-26 12:15 ` Masami Hiramatsu
2021-10-25 4:39 Stephen Rothwell
2021-10-25 6:13 ` Masami Hiramatsu
2021-08-23 9:58 Stephen Rothwell
2021-08-23 14:00 ` Steven Rostedt
2021-08-24 10:53 ` Stephen Rothwell
2020-11-16 6:35 Stephen Rothwell
2020-11-16 17:43 ` Steven Rostedt
2020-11-16 19:24 ` Jonathan Corbet
2020-11-16 20:25 ` Steven Rostedt
2020-11-16 20:29 ` Jonathan Corbet
2020-11-16 20:35 ` Steven Rostedt
2020-08-05 4:21 Stephen Rothwell
2019-11-15 3:02 Stephen Rothwell
2019-11-15 3:43 ` Steven Rostedt
2014-06-04 6:09 Stephen Rothwell
2014-06-04 16:26 ` Steven Rostedt
2014-06-04 16:49 ` Stephen Rothwell
2014-06-05 0:20 ` Fengguang Wu
2014-06-05 1:00 ` Steven Rostedt
2014-06-05 1:03 ` Fengguang Wu
2014-06-05 1:12 ` Steven Rostedt
2014-06-05 1:20 ` Steven Rostedt
2014-06-05 1:33 ` Fengguang Wu
2014-06-05 1:39 ` Steven Rostedt
2014-06-05 2:14 ` Fengguang Wu
2014-06-05 2:36 ` Steven Rostedt
2014-06-05 2:50 ` Fengguang Wu
2014-06-05 3:03 ` Fengguang Wu
2014-06-05 3:13 ` Steven Rostedt
2014-06-05 3:42 ` Fengguang Wu
2014-06-05 2:38 ` Steven Rostedt
2014-06-05 2:44 ` Fengguang Wu
2014-06-05 2:46 ` Steven Rostedt
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=20240515010141.6457d409@rorschach.local.home \
--to=rostedt@goodmis$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mhiramat@kernel$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=vdonnefort@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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