[PATCH mptcp-next] mptcp: make userspace_pm_append_new_local_addr static

Geliang Tang posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/0f4d10f41b5a51353cc4738d6b5d63b9aed8b1f7.1680252220.git.geliang.tang@suse.com
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
net/mptcp/pm_userspace.c | 4 ++--
net/mptcp/protocol.h     | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
[PATCH mptcp-next] mptcp: make userspace_pm_append_new_local_addr static
Posted by Geliang Tang 1 year, 1 month ago
mptcp_userspace_pm_append_new_local_addr is only used in pm_userspace.c,
so make it static.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
RESEND:
 - resend it as a cleanup.
---
 net/mptcp/pm_userspace.c | 4 ++--
 net/mptcp/protocol.h     | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index a02d3cbf2a1b..27a275805c06 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -25,8 +25,8 @@ void mptcp_free_local_addr_list(struct mptcp_sock *msk)
 	}
 }
 
-int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk,
-					     struct mptcp_pm_addr_entry *entry)
+static int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk,
+						    struct mptcp_pm_addr_entry *entry)
 {
 	DECLARE_BITMAP(id_bitmap, MPTCP_PM_MAX_ADDR_ID + 1);
 	struct mptcp_pm_addr_entry *match = NULL;
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index d84f0d19e9d6..08e14a4624a6 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -846,8 +846,6 @@ int mptcp_pm_remove_subflow(struct mptcp_sock *msk, const struct mptcp_rm_list *
 void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
 					struct list_head *rm_list);
 
-int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk,
-					     struct mptcp_pm_addr_entry *entry);
 void mptcp_free_local_addr_list(struct mptcp_sock *msk);
 int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info);
 int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info);
-- 
2.35.3
Re: [PATCH mptcp-next] mptcp: make userspace_pm_append_new_local_addr static
Posted by Matthieu Baerts 1 year, 1 month ago
Hi Geliang,

On 31/03/2023 10:44, Geliang Tang wrote:
> mptcp_userspace_pm_append_new_local_addr is only used in pm_userspace.c,
> so make it static.

Thank you for this cleanup!

I just applied it after having added a reference to commit 4638de5aefe5
("mptcp: handle local addrs announced by userspace PMs") just in case
this commit needs to be backported for some reasons: it could have been
static from the beginning.

Other than that, it looks good to me!

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Now in our tree (feat. for net-next):

New patches for t/upstream:
- 70fcd42eef63: mptcp: make userspace_pm_append_new_local_addr static
- Results: f0a5c9622efc..e2a442363ad9 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230331T161527

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net