Skip to content

Commit

Permalink
tracing, tty: fix warnings caused by branch tracing and tty_kref_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Nov 25, 2008
1 parent 0429149 commit 14bfc98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14bfc98

Please sign in to comment.