From patchwork Wed Jan 8 04:21:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 13930106 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39EA3199934 for ; Wed, 8 Jan 2025 04:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736310082; cv=none; b=ED2OShljUcX2588MLk5bj0oO2Ay9ZNEf1a+wb/I5HreY1Tod8mCO/MyCljX291eRPyo2tgVSzO4fFtsYnC9Dx9xlYUI1ldtJaY6Coy3z6YXBINKV9zq5atQJ1gy1obbVby4UhWeh9rlC24K7/K+I+R/uJJlTlDA0lEz6xo1Ltoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736310082; c=relaxed/simple; bh=1TdL6fMo0q6HTOrgCNnxLPuZp46bDoDk6rTO2e+pLe8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fjXmHxQqrWErk16NlSFBehlGG8GCA8ItidoQKZI53AFHHkTHn73OuzLzH4xjFSJKnrRhnW1WHLMlOAi4E/tVHX+3j+r6RY+ZF4X3yM4cDV3eZHrTwKgckXlulrecy+CbCz2x/Z0hQy2d6c/s4BuQETZrrvERpSyh3nTtCev6BaI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T4mQAyr+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T4mQAyr+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99A52C4CEE0; Wed, 8 Jan 2025 04:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736310081; bh=1TdL6fMo0q6HTOrgCNnxLPuZp46bDoDk6rTO2e+pLe8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T4mQAyr+pANGcKUxUV9UHgoBKSJ5Zi1mh0DOo4iru0ZejOFqg0pmPLdpRiyoCEUzr nQqJsq18Zcw8qBxK+JgWPm6s9g/Skp4zSsAEUUjoJoFHm1JKU+XQrHrP5baM8cy+Po MMXwB6fEINFcKBjyppc8Ayqne//SUYMC0/yXLjIxHgWK3KYFAK7tZHHm8v8Aqv8CZe 5X197y9ADd5CwflGuaQ1Tm4YuUGgaC1kSIIAVSpcKDj2DDROwznCwoNiS1CQ+ju68u LqrNEOjQdKylA745XU2nB56aa9vKQziBViF2+bNyM0dOwmhKzhoh+n6tC4bUjfrh8m X3fFAKg2IX4LA== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v3 2/8] mptcp: drop skb parameter of get_addr Date: Wed, 8 Jan 2025 12:21:06 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang The first parameters 'skb' of get_addr() interfaces are now useless since mptcp_userspace_pm_get_sock() helper is used. This patch drops these useless parameters of them. Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 8 ++++---- net/mptcp/pm_netlink.c | 2 +- net/mptcp/pm_userspace.c | 3 +-- net/mptcp/protocol.h | 5 ++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index a29be5ff73a6..526e5bca1fa1 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -434,16 +434,16 @@ bool mptcp_pm_is_backup(struct mptcp_sock *msk, struct sock_common *skc) return mptcp_pm_nl_is_backup(msk, &skc_local); } -static int mptcp_pm_get_addr(struct sk_buff *skb, struct genl_info *info) +static int mptcp_pm_get_addr(struct genl_info *info) { if (info->attrs[MPTCP_PM_ATTR_TOKEN]) - return mptcp_userspace_pm_get_addr(skb, info); - return mptcp_pm_nl_get_addr(skb, info); + return mptcp_userspace_pm_get_addr(info); + return mptcp_pm_nl_get_addr(info); } int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info) { - return mptcp_pm_get_addr(skb, info); + return mptcp_pm_get_addr(info); } static int mptcp_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 13be574bbc35..9b5622ffaad2 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1773,7 +1773,7 @@ int mptcp_nl_fill_addr(struct sk_buff *skb, return -EMSGSIZE; } -int mptcp_pm_nl_get_addr(struct sk_buff *skb, struct genl_info *info) +int mptcp_pm_nl_get_addr(struct genl_info *info) { struct pm_nl_pernet *pernet = genl_info_pm_nl(info); struct mptcp_pm_addr_entry addr, *entry; diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index 16337d08186b..be16ab0ea287 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -684,8 +684,7 @@ int mptcp_userspace_pm_dump_addr(struct sk_buff *msg, return ret; } -int mptcp_userspace_pm_get_addr(struct sk_buff *skb, - struct genl_info *info) +int mptcp_userspace_pm_get_addr(struct genl_info *info) { struct mptcp_pm_addr_entry addr, *entry; struct mptcp_sock *msk; diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 99ab37417b25..36e5fbf84b2b 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -1124,9 +1124,8 @@ int mptcp_pm_nl_dump_addr(struct sk_buff *msg, struct netlink_callback *cb); int mptcp_userspace_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb); -int mptcp_pm_nl_get_addr(struct sk_buff *skb, struct genl_info *info); -int mptcp_userspace_pm_get_addr(struct sk_buff *skb, - struct genl_info *info); +int mptcp_pm_nl_get_addr(struct genl_info *info); +int mptcp_userspace_pm_get_addr(struct genl_info *info); static inline u8 subflow_get_local_id(const struct mptcp_subflow_context *subflow) {