summaryrefslogtreecommitdiff
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-09-07 04:10:26 +0300
committerJakub Kicinski <kuba@kernel.org>2024-09-07 04:10:26 +0300
commit7ab50d5e884077b4c01931d16124a5f2cc86f1db (patch)
treeaf01b180167b41b0e37e9c0b6cf0fc2a584680e9 /net/tipc/socket.c
parentbe8a17fe994dbffd2dfa0ad83bae9bbeef54c076 (diff)
parent17f01391903de08c8a33407de9f502fc1cc8b5ff (diff)
downloadlinux-7ab50d5e884077b4c01931d16124a5f2cc86f1db.tar.xz
Merge branch 'make-use-of-the-helper-macro-list_head'
Hongbo Li says: ==================== make use of the helper macro LIST_HEAD() The macro LIST_HEAD() declares a list variable and initializes it, which can be used to simplify the steps of list initialization, thereby simplifying the code. These serials just do some equivalatent substitutions, and with no functional modifications. ==================== Link: https://patch.msgid.link/20240904093243.3345012-1-lihongbo22@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 1a0cd06f0eae..65dcbb54f55d 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1009,12 +1009,11 @@ static int tipc_send_group_anycast(struct socket *sock, struct msghdr *m,
struct tipc_member *mbr = NULL;
struct net *net = sock_net(sk);
u32 node, port, exclude;
- struct list_head dsts;
+ LIST_HEAD(dsts);
int lookups = 0;
int dstcnt, rc;
bool cong;
- INIT_LIST_HEAD(&dsts);
ua->sa.type = msg_nametype(hdr);
ua->scope = msg_lookup_scope(hdr);
@@ -1161,10 +1160,9 @@ static int tipc_send_group_mcast(struct socket *sock, struct msghdr *m,
struct tipc_group *grp = tsk->group;
struct tipc_msg *hdr = &tsk->phdr;
struct net *net = sock_net(sk);
- struct list_head dsts;
u32 dstcnt, exclude;
+ LIST_HEAD(dsts);
- INIT_LIST_HEAD(&dsts);
ua->sa.type = msg_nametype(hdr);
ua->scope = msg_lookup_scope(hdr);
exclude = tipc_group_exclude(grp);