瀏覽代碼

tracing, tty: fix warnings caused by branch tracing and tty_kref_get()

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>
Ingo Molnar 16 年之前
父節點
當前提交
14bfc987e3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/tty.h

+ 1 - 1
include/linux/tty.h

@@ -325,7 +325,7 @@ extern struct class *tty_class;
  *	go away
  *	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)
 	if (tty)
 		kref_get(&tty->kref);
 		kref_get(&tty->kref);