diff options
author | Mat Martineau <mathew.j.martineau@linux.intel.com> | 2022-04-28 00:49:57 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-30 02:25:13 +0200 |
commit | 9273b9d5799598d35f7a2a2df61b8e29102aeac8 (patch) | |
tree | 9cd9d6252a5b9e1bf647804eb91fba1ddac634e8 /net/mptcp/pm_netlink.c | |
parent | Merge branch 'net-phy-micrel-add-coma-mode-support' (diff) | |
download | linux-9273b9d5799598d35f7a2a2df61b8e29102aeac8.tar.xz linux-9273b9d5799598d35f7a2a2df61b8e29102aeac8.zip |
mptcp: Remove redundant assignments in path manager init
A few members of the mptcp_pm_data struct were assigned to hard-coded
values in mptcp_pm_data_reset(), and then immediately changed in
mptcp_pm_nl_data_init().
Instead, flatten all the assignments in to mptcp_pm_data_reset().
v2: Resolve conflicts due to rename of mptcp_pm_data_reset()
v4: Resolve conflict in mptcp_pm_data_reset()
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/pm_netlink.c')
-rw-r--r-- | net/mptcp/pm_netlink.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index c20261b612e9..bbbbfb421eec 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1061,18 +1061,6 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc) return ret; } -void mptcp_pm_nl_data_init(struct mptcp_sock *msk) -{ - struct mptcp_pm_data *pm = &msk->pm; - bool subflows; - - subflows = !!mptcp_pm_get_subflows_max(msk); - WRITE_ONCE(pm->work_pending, (!!mptcp_pm_get_local_addr_max(msk) && subflows) || - !!mptcp_pm_get_add_addr_signal_max(msk)); - WRITE_ONCE(pm->accept_addr, !!mptcp_pm_get_add_addr_accept_max(msk) && subflows); - WRITE_ONCE(pm->accept_subflow, subflows); -} - #define MPTCP_PM_CMD_GRP_OFFSET 0 #define MPTCP_PM_EV_GRP_OFFSET 1 |