Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: https://github.com/multipath-tcp/mptcp_net-next/issues/606 [1]
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260205-net-mptcp-misc-fixes-6-19-rc8-v2-2-c2720ce75c34@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Matthieu Baerts (NGI0) and committed by
Jakub Kicinski
364a7084 d191101d

+5 -6
+5 -6
net/mptcp/pm_kernel.c
··· 1044 1044 return ret; 1045 1045 } 1046 1046 1047 - static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk, 1047 + static void mptcp_pm_remove_anno_addr(struct mptcp_sock *msk, 1048 1048 const struct mptcp_addr_info *addr, 1049 1049 bool force) 1050 1050 { 1051 1051 struct mptcp_rm_list list = { .nr = 0 }; 1052 - bool ret; 1052 + bool announced; 1053 1053 1054 1054 list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr); 1055 1055 1056 - ret = mptcp_remove_anno_list_by_saddr(msk, addr); 1057 - if (ret || force) { 1056 + announced = mptcp_remove_anno_list_by_saddr(msk, addr); 1057 + if (announced || force) { 1058 1058 spin_lock_bh(&msk->pm.lock); 1059 - if (ret) 1059 + if (announced) 1060 1060 msk->pm.add_addr_signaled--; 1061 1061 mptcp_pm_remove_addr(msk, &list); 1062 1062 spin_unlock_bh(&msk->pm.lock); 1063 1063 } 1064 - return ret; 1065 1064 } 1066 1065 1067 1066 static void __mark_subflow_endp_available(struct mptcp_sock *msk, u8 id)