From nobody Sun Dec 22 08:44:45 2024 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 E65064C79 for ; Sat, 7 Dec 2024 01:08:13 +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=1733533694; cv=none; b=RKs0pFA1DU8zkGwxSivGCHEdH5FxnOQPtvZXYzetBW/KOdHb/K2o4NqcWH0A4Q81fMBD0Hw6+/Cu7R72nubgTT5R5dqFzFFZ0nWke431teUhoUGuDuDYVutVYNwYN5cTJSIgeeR8ob9LyG2MXaIoEQBhu7Nn8jzg/bZH6YusInQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733533694; c=relaxed/simple; bh=4PR3+3EI82K1GTjuzSmmEENHBxePC37jhoptFJjxEZA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=konlbI/QFjVMNdPCchsjPhIWMIBlf3jO48DisRvLUPajK5uKsiMu+dkJgHm8vsatgs8mOrVjNBi6Frpt4CLGUz1V3LKDM+7hvWV3GpLV6Zj8O11t/xQI7FjApieBxiS37falsEDzVK/N1BewOffZI5InFS/vDuneL88cTv9sXv0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lqrRZluP; 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="lqrRZluP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C730CC4CED2; Sat, 7 Dec 2024 01:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733533693; bh=4PR3+3EI82K1GTjuzSmmEENHBxePC37jhoptFJjxEZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lqrRZluPICplK24siYr4G7JB8aS6/iEYBrsllh/yb58/t0ZZCjB8y65g3qGNse1Xq 48r1IFsXr+rEt0eJQ1rryiaXx9XX4D4odYxsfe6T6RwUJvGhhis8EGsSifMF0mrerP 6cdd3D2/UUDbfywYsBQ8K54pU3f/gE6aGpaCl4syV5/bMCOe08Lk2G9MMG3nNOexSz RYjGqDAklbA9fAk1JsXZRrxT/qVY7xBFSesuy9BqIGn0a+PSYK+6QaprZ4haJbS0yE XrEgfqSJl5CYlnmbUXjgcrcD68xhn3eheKiUF907ryE7uLkCT2c2bUzrHJ9M8Hb9dI 4IJWhNL3l/raQ== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next 2/7] mptcp: drop skb parameter of get_addr Date: Sat, 7 Dec 2024 09:07:22 +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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geliang Tang The first parameters "skb" of all three 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, struc= t sock_common *skc) return mptcp_pm_nl_is_backup(msk, &skc_local); } =20 -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); } =20 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); } =20 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 32367fcc728e..92b4dcc310d3 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1762,7 +1762,7 @@ int mptcp_nl_fill_addr(struct sk_buff *skb, return -EMSGSIZE; } =20 -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 nlattr *attr =3D info->attrs[MPTCP_PM_ENDPOINT_ADDR]; struct pm_nl_pernet *pernet =3D genl_info_pm_nl(info); diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index 740a10d669f8..ab92efec6618 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -663,8 +663,7 @@ int mptcp_userspace_pm_dump_addr(struct sk_buff *msg, return ret; } =20 -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 nlattr *attr =3D info->attrs[MPTCP_PM_ENDPOINT_ADDR]; struct mptcp_pm_addr_entry addr, *entry; diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 3bff78efd8ed..dd673b41f0ce 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -1131,9 +1131,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); =20 static inline u8 subflow_get_local_id(const struct mptcp_subflow_context *= subflow) { --=20 2.45.2