All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: ftrace tree build warnings
@ 2008-11-25  2:38 Stephen Rothwell
  2008-11-25  2:44 ` Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-11-25  2:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: linux-next, Steven Rostedt, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

Hi all,

Today's linux-next build (x86_64 allmodconfig) produced lots of these
warnings:

include/linux/tty.h:330: warning: '______f' is static but declared in inline function 'tty_kref_get' which is not static

Caused by commit 2bcd521a684cc94befbe2ce7d5b613c841b0d304 ("trace:
profile all if conditionals").  Something needs to be done about
this ...  maybe tty_kref_get needs to be "static inline" instead of
"extern inline"?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: ftrace tree build warnings
  2008-11-25  2:38 linux-next: ftrace tree build warnings Stephen Rothwell
@ 2008-11-25  2:44 ` Steven Rostedt
  2008-11-25  8:00 ` Ingo Molnar
  2008-11-25 10:25 ` Alan Cox
  2 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-11-25  2:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-next,
	Alan Cox


On Tue, 2008-11-25 at 13:38 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next build (x86_64 allmodconfig) produced lots of these
> warnings:
> 
> include/linux/tty.h:330: warning: '______f' is static but declared in inline function 'tty_kref_get' which is not static
> 
> Caused by commit 2bcd521a684cc94befbe2ce7d5b613c841b0d304 ("trace:
> profile all if conditionals").  Something needs to be done about
> this ...  maybe tty_kref_get needs to be "static inline" instead of
> "extern inline"?
> 

Is there a way to suppress this warning here? Since we are only
profiling, if it complies fine, then it should not be an issue.


Looking at the uses of this function, is there any reason that it is not
"static inline"?

-- Steve
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: ftrace tree build warnings
  2008-11-25  2:38 linux-next: ftrace tree build warnings Stephen Rothwell
  2008-11-25  2:44 ` Steven Rostedt
@ 2008-11-25  8:00 ` Ingo Molnar
  2008-11-25  8:17   ` Stephen Rothwell
  2008-11-25 10:25 ` Alan Cox
  2 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2008-11-25  8:00 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, H. Peter Anvin, linux-next, Steven Rostedt,
	Alan Cox


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> Today's linux-next build (x86_64 allmodconfig) produced lots of these
> warnings:
> 
> include/linux/tty.h:330: warning: '______f' is static but declared in inline function 'tty_kref_get' which is not static
> 
> Caused by commit 2bcd521a684cc94befbe2ce7d5b613c841b0d304 ("trace:
> profile all if conditionals").  Something needs to be done about
> this ...  maybe tty_kref_get needs to be "static inline" instead of
> "extern inline"?

i've queued up the fix below, and pushed out a new ftrace-next tree.

Thanks,

	Ingo

------------------>
From 14bfc987e395797dfe03e915e8b4c7fc9e5078e4 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 25 Nov 2008 08:58:11 +0100
Subject: [PATCH] tracing, tty: fix warnings caused by branch tracing and tty_kref_get()
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Stephen Rothwell reported tht this warning started triggering in
linux-next:

  In file included from init/main.c:27:
  include/linux/tty.h: In function ‘tty_kref_get’:
  include/linux/tty.h:330: warning: ‘______f’ is static but declared in inline function ‘tty_kref_get’ which is not static

Which gcc emits for 'extern inline' functions that nevertheless define
static variables. Change it to 'static inline', which is the norm
in the kernel anyway.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/tty.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/tty.h b/include/linux/tty.h
index 3b8121d..eaec37c 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -325,7 +325,7 @@ extern struct class *tty_class;
  *	go away
  */
 
-extern inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
+static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
 {
 	if (tty)
 		kref_get(&tty->kref);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: linux-next: ftrace tree build warnings
  2008-11-25  8:00 ` Ingo Molnar
@ 2008-11-25  8:17   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-11-25  8:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, H. Peter Anvin, linux-next, Steven Rostedt,
	Alan Cox

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi Ingo,

On Tue, 25 Nov 2008 09:00:35 +0100 Ingo Molnar <mingo@elte.hu> wrote:
>
> i've queued up the fix below, and pushed out a new ftrace-next tree.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: ftrace tree build warnings
  2008-11-25  2:38 linux-next: ftrace tree build warnings Stephen Rothwell
  2008-11-25  2:44 ` Steven Rostedt
  2008-11-25  8:00 ` Ingo Molnar
@ 2008-11-25 10:25 ` Alan Cox
  2008-11-25 12:19   ` [PATCH] tracing, tty: fix warnings caused by branch tracing and tty_kref_get() Ingo Molnar
  2 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2008-11-25 10:25 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-next,
	Steven Rostedt, Alan Cox

On Tue, 25 Nov 2008 13:38:28 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> Today's linux-next build (x86_64 allmodconfig) produced lots of these
> warnings:
> 
> include/linux/tty.h:330: warning: '______f' is static but declared in inline function 'tty_kref_get' which is not static
> 
> Caused by commit 2bcd521a684cc94befbe2ce7d5b613c841b0d304 ("trace:
> profile all if conditionals").  Something needs to be done about
> this ...  maybe tty_kref_get needs to be "static inline" instead of
> "extern inline"?

If someone from the ftrace crew can sort the problem out and send me a
diff for the ttydev tree that shouldn't be a problem, but really it looks
like a problem with ftrace as that can't be the only case this happens
surely ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] tracing, tty: fix warnings caused by branch tracing and tty_kref_get()
  2008-11-25 10:25 ` Alan Cox
@ 2008-11-25 12:19   ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2008-11-25 12:19 UTC (permalink / raw)
  To: Alan Cox
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next,
	Steven Rostedt, Alan Cox


* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Tue, 25 Nov 2008 13:38:28 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > Today's linux-next build (x86_64 allmodconfig) produced lots of these
> > warnings:
> > 
> > include/linux/tty.h:330: warning: '______f' is static but declared in inline function 'tty_kref_get' which is not static
> > 
> > Caused by commit 2bcd521a684cc94befbe2ce7d5b613c841b0d304 ("trace:
> > profile all if conditionals").  Something needs to be done about
> > this ...  maybe tty_kref_get needs to be "static inline" instead of
> > "extern inline"?
> 
> If someone from the ftrace crew can sort the problem out and send me 
> a diff for the ttydev tree that shouldn't be a problem, but really 
> it looks like a problem with ftrace as that can't be the only case 
> this happens surely ?

i've done quite wide build testing of it and tty.h seems to be the 
only affected file triggering a warning due to this. ('extern inline' 
has been eliminated from most of the kernel in recent cycles)

	Ingo

---------------->
From 14bfc987e395797dfe03e915e8b4c7fc9e5078e4 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 25 Nov 2008 08:58:11 +0100
Subject: [PATCH] tracing, tty: fix warnings caused by branch tracing and tty_kref_get()
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Stephen Rothwell reported tht this warning started triggering in
linux-next:

  In file included from init/main.c:27:
  include/linux/tty.h: In function ‘tty_kref_get’:
  include/linux/tty.h:330: warning: ‘______f’ is static but declared in inline function ‘tty_kref_get’ which is not static

Which gcc emits for 'extern inline' functions that nevertheless define
static variables. Change it to 'static inline', which is the norm
in the kernel anyway.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/tty.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/tty.h b/include/linux/tty.h
index 3b8121d..eaec37c 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -325,7 +325,7 @@ extern struct class *tty_class;
  *	go away
  */
 
-extern inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
+static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
 {
 	if (tty)
 		kref_get(&tty->kref);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-25 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25  2:38 linux-next: ftrace tree build warnings Stephen Rothwell
2008-11-25  2:44 ` Steven Rostedt
2008-11-25  8:00 ` Ingo Molnar
2008-11-25  8:17   ` Stephen Rothwell
2008-11-25 10:25 ` Alan Cox
2008-11-25 12:19   ` [PATCH] tracing, tty: fix warnings caused by branch tracing and tty_kref_get() Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.