All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fix a compile error when SOCK_REFCNT_DEBUG is enabled
@ 2013-02-16  8:28 Ying Xue
  2013-02-18 17:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ying Xue @ 2013-02-16  8:28 UTC (permalink / raw)
  To: davem; +Cc: netdev

When SOCK_REFCNT_DEBUG is enabled, below build error is met:

kernel/sysctl_binary.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
kernel/audit.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
make[1]: *** [kernel/built-in.o] Error 1
make: *** [kernel] Error 2

So we decide to make sk_refcnt_debug_release static to eliminate
the error.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
---
 include/net/sock.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 182ca99..25afaa0 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1037,7 +1037,7 @@ static inline void sk_refcnt_debug_dec(struct sock *sk)
 	       sk->sk_prot->name, sk, atomic_read(&sk->sk_prot->socks));
 }
 
-inline void sk_refcnt_debug_release(const struct sock *sk)
+static inline void sk_refcnt_debug_release(const struct sock *sk)
 {
 	if (atomic_read(&sk->sk_refcnt) != 1)
 		printk(KERN_DEBUG "Destruction of the %s socket %p delayed, refcnt=%d\n",
-- 
1.7.9.5

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

* Re: [PATCH] net: fix a compile error when SOCK_REFCNT_DEBUG is enabled
  2013-02-16  8:28 [PATCH] net: fix a compile error when SOCK_REFCNT_DEBUG is enabled Ying Xue
@ 2013-02-18 17:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-02-18 17:31 UTC (permalink / raw)
  To: ying.xue; +Cc: netdev

From: Ying Xue <ying.xue@windriver.com>
Date: Sat, 16 Feb 2013 16:28:25 +0800

> When SOCK_REFCNT_DEBUG is enabled, below build error is met:
> 
> kernel/sysctl_binary.o: In function `sk_refcnt_debug_release':
> include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
> kernel/sysctl.o:include/net/sock.h:1025: first defined here
> kernel/audit.o: In function `sk_refcnt_debug_release':
> include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
> kernel/sysctl.o:include/net/sock.h:1025: first defined here
> make[1]: *** [kernel/built-in.o] Error 1
> make: *** [kernel] Error 2
> 
> So we decide to make sk_refcnt_debug_release static to eliminate
> the error.
> 
> Signed-off-by: Ying Xue <ying.xue@windriver.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2013-02-18 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-16  8:28 [PATCH] net: fix a compile error when SOCK_REFCNT_DEBUG is enabled Ying Xue
2013-02-18 17:31 ` David Miller

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.