Skip to content

Commit 24edf20

Browse files
matttbeintel-lab-lkp
authored andcommitted
mptcp: pm: in-kernel: clarify mptcp_pm_remove_anno_addr()
The variable 'ret' was used, but it was not cleared what it was, and probably led to an issue [1]. Rename it to 'announced' to avoid confusions. While at it, remove the returned value of the helper: it is only used in one place, and the returned value is not used. Link: multipath-tcp/mptcp_net-next#606 [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 84e5beb commit 24edf20

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

net/mptcp/pm_kernel.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,24 +1045,23 @@ int mptcp_pm_nl_add_addr_doit(struct sk_buff *skb, struct genl_info *info)
10451045
return ret;
10461046
}
10471047

1048-
static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
1048+
static void mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
10491049
const struct mptcp_addr_info *addr,
10501050
bool force)
10511051
{
10521052
struct mptcp_rm_list list = { .nr = 0 };
1053-
bool ret;
1053+
bool announced;
10541054

10551055
list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr);
10561056

1057-
ret = mptcp_remove_anno_list_by_saddr(msk, addr);
1058-
if (ret || force) {
1057+
announced = mptcp_remove_anno_list_by_saddr(msk, addr);
1058+
if (announced || force) {
10591059
spin_lock_bh(&msk->pm.lock);
1060-
if (ret)
1060+
if (announced)
10611061
msk->pm.add_addr_signaled--;
10621062
mptcp_pm_remove_addr(msk, &list);
10631063
spin_unlock_bh(&msk->pm.lock);
10641064
}
1065-
return ret;
10661065
}
10671066

10681067
static void __mark_subflow_endp_available(struct mptcp_sock *msk, u8 id)

0 commit comments

Comments
 (0)