diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-01-24 03:15:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:00:37 -0500 |
commit | 74feb6e84e189707ca1324a92f7206617efbd735 (patch) | |
tree | 8d18a7fff38ca5d94d1362b283392b6d0340d0eb /net/ipv4/icmp.c | |
parent | 65f7651788e18fadb2fbb7276af935d7871e1803 (diff) |
[ICMP]: Avoid sparse warnings in net/ipv4/icmp.c
CHECK net/ipv4/icmp.c
net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' -
unexpected unlock
net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - different
lock contexts for basic block
net/ipv4/icmp.c:430:6: warning: context imbalance in 'icmp_send' - different
lock contexts for basic block
Solution is to declare both icmp_xmit_lock() and icmp_xmit_unlock() as inline
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index ce5b4be559aa..1a6024978e28 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -232,7 +232,7 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1]; | |||
232 | static DEFINE_PER_CPU(struct socket *, __icmp_socket) = NULL; | 232 | static DEFINE_PER_CPU(struct socket *, __icmp_socket) = NULL; |
233 | #define icmp_socket __get_cpu_var(__icmp_socket) | 233 | #define icmp_socket __get_cpu_var(__icmp_socket) |
234 | 234 | ||
235 | static __inline__ int icmp_xmit_lock(void) | 235 | static inline int icmp_xmit_lock(void) |
236 | { | 236 | { |
237 | local_bh_disable(); | 237 | local_bh_disable(); |
238 | 238 | ||
@@ -246,7 +246,7 @@ static __inline__ int icmp_xmit_lock(void) | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | static void icmp_xmit_unlock(void) | 249 | static inline void icmp_xmit_unlock(void) |
250 | { | 250 | { |
251 | spin_unlock_bh(&icmp_socket->sk->sk_lock.slock); | 251 | spin_unlock_bh(&icmp_socket->sk->sk_lock.slock); |
252 | } | 252 | } |