From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
Sam Ravnborg <sam@ravnborg.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] trace/ring_buffer: fix section mismatch warning
Date: Sat, 21 Mar 2009 12:41:39 +0100 [thread overview]
Message-ID: <20090321124139.4ca216d9@osiris.boeblingen.de.ibm.com> (raw)
From: Heiko Carstens <heiko.carstens@de.ibm.com>
With linux-next I get this:
Section mismatch in reference from the function ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
The function ring_buffer_alloc() references
the function __cpuinit rb_cpu_notify().
This is often because ring_buffer_alloc lacks a __cpuinit
annotation or the annotation of rb_cpu_notify is wrong.
This is a false positive since rb_cpu_notify gets only referenced if
CONFIG_HOTPLUG_CPU=y.
To get rid of the warning annotate ring_buffer_alloc with __ref.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
kernel/trace/ring_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-next/kernel/trace/ring_buffer.c
===================================================================
--- linux-next.orig/kernel/trace/ring_buffer.c
+++ linux-next/kernel/trace/ring_buffer.c
@@ -549,7 +549,7 @@ static int __cpuinit rb_cpu_notify(struc
* when the buffer wraps. If this flag is not set, the buffer will
* drop data when the tail hits the head.
*/
-struct ring_buffer *ring_buffer_alloc(unsigned long size, unsigned flags)
+struct ring_buffer * __ref ring_buffer_alloc(unsigned long size, unsigned flags)
{
struct ring_buffer *buffer;
int bsize;
next reply other threads:[~2009-03-21 11:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 11:41 Heiko Carstens [this message]
2009-03-21 14:39 ` Ingo Molnar
2009-03-21 15:01 ` Heiko Carstens
2009-03-21 15:20 ` Ingo Molnar
2009-03-21 20:33 ` Sam Ravnborg
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=20090321124139.4ca216d9@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=sam@ravnborg.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®