projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c10aa71
)
sock: use hlist_entry_safe
author
Geliang Tang
<geliangtang@gmail.com>
Fri, 20 Jan 2017 14:27:04 +0000
(22:27 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 20 Jan 2017 16:38:45 +0000
(11:38 -0500)
Use hlist_entry_safe() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
patch
|
blob
|
blame
|
history
diff --git
a/include/net/sock.h
b/include/net/sock.h
index 389a0a619b457ca8c94a907f910a89c5d41feb40..7144750d14e56b9d5392e43dc46cb40a87e3d397 100644
(file)
--- a/
include/net/sock.h
+++ b/
include/net/sock.h
@@
-544,8
+544,7
@@
static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
static inline struct sock *sk_next(const struct sock *sk)
{
- return sk->sk_node.next ?
- hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
+ return hlist_entry_safe(sk->sk_node.next, struct sock, sk_node);
}
static inline struct sock *sk_nulls_next(const struct sock *sk)