Skip to content

Commit

Permalink
[APPLETALK]: Annotations to clear sparse warnings
Browse files Browse the repository at this point in the history
  CHECK   net/appletalk/aarp.c
net/appletalk/aarp.c:951:14: warning: context imbalance in 'aarp_seq_start' - wrong count at exit
net/appletalk/aarp.c:977:13: warning: context imbalance in 'aarp_seq_stop' - unexpected unlock
  CHECK   net/appletalk/atalk_proc.c
net/appletalk/atalk_proc.c:34:11: warning: context imbalance in 'atalk_seq_interface_start' - wrong count at exit
net/appletalk/atalk_proc.c:54:13: warning: context imbalance in 'atalk_seq_interface_stop' - unexpected unlock
net/appletalk/atalk_proc.c:93:11: warning: context imbalance in 'atalk_seq_route_start' - wrong count at exit
net/appletalk/atalk_proc.c:113:13: warning: context imbalance in 'atalk_seq_route_stop' - unexpected unlock
net/appletalk/atalk_proc.c:161:11: warning: context imbalance in 'atalk_seq_socket_start' - wrong count at exit
net/appletalk/atalk_proc.c:178:13: warning: context imbalance in 'atalk_seq_socket_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 28, 2008
1 parent c71e916 commit ca629f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/appletalk/aarp.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ static struct aarp_entry *iter_next(struct aarp_iter_state *iter, loff_t *pos)
}

static void *aarp_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(aarp_lock)
{
struct aarp_iter_state *iter = seq->private;

Expand Down Expand Up @@ -975,6 +976,7 @@ static void *aarp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void aarp_seq_stop(struct seq_file *seq, void *v)
__releases(aarp_lock)
{
read_unlock_bh(&aarp_lock);
}
Expand Down
6 changes: 6 additions & 0 deletions net/appletalk/atalk_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos)
}

static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos)
__acquires(atalk_interfaces_lock)
{
loff_t l = *pos;

Expand All @@ -52,6 +53,7 @@ static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos
}

static void atalk_seq_interface_stop(struct seq_file *seq, void *v)
__releases(atalk_interfaces_lock)
{
read_unlock_bh(&atalk_interfaces_lock);
}
Expand Down Expand Up @@ -86,6 +88,7 @@ static __inline__ struct atalk_route *atalk_get_route_idx(loff_t pos)
}

static void *atalk_seq_route_start(struct seq_file *seq, loff_t *pos)
__acquires(atalk_routes_lock)
{
loff_t l = *pos;

Expand All @@ -111,6 +114,7 @@ static void *atalk_seq_route_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void atalk_seq_route_stop(struct seq_file *seq, void *v)
__releases(atalk_routes_lock)
{
read_unlock_bh(&atalk_routes_lock);
}
Expand Down Expand Up @@ -154,6 +158,7 @@ static __inline__ struct sock *atalk_get_socket_idx(loff_t pos)
}

static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
__acquires(atalk_sockets_lock)
{
loff_t l = *pos;

Expand All @@ -176,6 +181,7 @@ static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void atalk_seq_socket_stop(struct seq_file *seq, void *v)
__releases(atalk_sockets_lock)
{
read_unlock_bh(&atalk_sockets_lock);
}
Expand Down

0 comments on commit ca629f2

Please sign in to comment.