diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-08 12:39:42 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2005-11-08 12:39:42 -0500 |
| commit | 9ee6b535af4c2c97b4e3b88f37f244bf1004ebd4 (patch) | |
| tree | c8a45fcf863e8d72b91fd91ef94fd1f2d70fecb3 /include | |
| parent | b541ca2c5a3f3f399d6f2ec9da33c1be5a8d8c19 (diff) | |
[NET]: sk_add_backlog convert from macro to inline
There is no reason for sk_add_backlog to be a macro. It can
just be an inline function and get type checking.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sock.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index e0498bd36004..ff13c4cc287a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -461,16 +461,16 @@ static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) | |||
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | /* The per-socket spinlock must be held here. */ | 463 | /* The per-socket spinlock must be held here. */ |
| 464 | #define sk_add_backlog(__sk, __skb) \ | 464 | static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
| 465 | do { if (!(__sk)->sk_backlog.tail) { \ | 465 | { |
| 466 | (__sk)->sk_backlog.head = \ | 466 | if (!sk->sk_backlog.tail) { |
| 467 | (__sk)->sk_backlog.tail = (__skb); \ | 467 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; |
| 468 | } else { \ | 468 | } else { |
| 469 | ((__sk)->sk_backlog.tail)->next = (__skb); \ | 469 | sk->sk_backlog.tail->next = skb; |
| 470 | (__sk)->sk_backlog.tail = (__skb); \ | 470 | sk->sk_backlog.tail = skb; |
| 471 | } \ | 471 | } |
| 472 | (__skb)->next = NULL; \ | 472 | skb->next = NULL; |
| 473 | } while(0) | 473 | } |
| 474 | 474 | ||
| 475 | #define sk_wait_event(__sk, __timeo, __condition) \ | 475 | #define sk_wait_event(__sk, __timeo, __condition) \ |
| 476 | ({ int rc; \ | 476 | ({ int rc; \ |
