projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac6a86a
)
sctp: use list_is_singular in sctp_list_single_entry
author
Geliang Tang
<geliangtang@gmail.com>
Sun, 28 Jun 2020 09:32:25 +0000
(17:32 +0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 29 Jun 2020 04:45:58 +0000
(21:45 -0700)
Use list_is_singular() instead of open-coding.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/sctp.h
patch
|
blob
|
history
diff --git
a/include/net/sctp/sctp.h
b/include/net/sctp/sctp.h
index
f8bcb75
..
e3bd198
100644
(file)
--- a/
include/net/sctp/sctp.h
+++ b/
include/net/sctp/sctp.h
@@
-412,7
+412,7
@@
static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
/* Tests if the list has one and only one entry. */
static inline int sctp_list_single_entry(struct list_head *head)
{
- return
(head->next != head) && (head->next == head->prev
);
+ return
list_is_singular(head
);
}
static inline bool sctp_chunk_pending(const struct sctp_chunk *chunk)