Thread (12 messages) flat view 12 messages, 3 authors, 2012-07-05

Re: [PATCH net-next 1/2] ieee802154: sparse warnings: make symbols static

From: Eric Dumazet <hidden>
Date: 2012-07-02 06:49:14

On Mon, 2012-07-02 at 08:44 +0200, Eric Dumazet wrote:
On Mon, 2012-07-02 at 08:37 +0200, Eric Dumazet wrote:
quoted
On Mon, 2012-07-02 at 10:18 +0400, Alexander Smirnov wrote:
quoted
Make symbols static to avoid the following warning shown up
by sparse:

    warning: symbol ... was not declared. Should it be static?

Signed-off-by: Alexander Smirnov <redacted>
---
 net/ieee802154/6lowpan.c |    2 +-
 net/mac802154/mac_cmd.c  |    2 +-
 net/mac802154/mib.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index cd5007f..17ad28f 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -124,7 +124,7 @@ struct lowpan_fragment {
 
 static unsigned short fragment_tag;
 static LIST_HEAD(lowpan_fragments);
-spinlock_t flist_lock;
+static spinlock_t flist_lock;
 
static DEFINE_SPINLOCK(flist_lock);

and of course commit 768f7c7c121e80f4 (6lowpan: add missing
spin_lock_init() ) must be reverted.
You should validate this code with LOCKDEP

lowpan_dellink() does a spin_lock(&flist_lock);
while same lock can be taken by lowpan_fragment_timer_expired() from
timer irq, -> deadlock.

del_timer() probably needs a del_timer_sync() too
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help