Skip to content

Commit

Permalink
mptcp: rename 'sk' to 'ssk' in mptcp_token_new_connect()
Browse files Browse the repository at this point in the history
'ssk' should be more appropriate to be the name of the first argument
in mptcp_token_new_connect().

Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Menglong Dong authored and David S. Miller committed Jan 9, 2023
1 parent ade4d75 commit 294de90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion net/mptcp/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static inline void mptcp_token_init_request(struct request_sock *req)

int mptcp_token_new_request(struct request_sock *req);
void mptcp_token_destroy_request(struct request_sock *req);
int mptcp_token_new_connect(struct sock *sk);
int mptcp_token_new_connect(struct sock *ssk);
void mptcp_token_accept(struct mptcp_subflow_request_sock *r,
struct mptcp_sock *msk);
bool mptcp_token_exists(u32 token);
Expand Down
8 changes: 4 additions & 4 deletions net/mptcp/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int mptcp_token_new_request(struct request_sock *req)

/**
* mptcp_token_new_connect - create new key/idsn/token for subflow
* @sk: the socket that will initiate a connection
* @ssk: the socket that will initiate a connection
*
* This function is called when a new outgoing mptcp connection is
* initiated.
Expand All @@ -148,9 +148,9 @@ int mptcp_token_new_request(struct request_sock *req)
*
* returns 0 on success.
*/
int mptcp_token_new_connect(struct sock *sk)
int mptcp_token_new_connect(struct sock *ssk)
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
struct mptcp_sock *msk = mptcp_sk(subflow->conn);
int retries = MPTCP_TOKEN_MAX_RETRIES;
struct token_bucket *bucket;
Expand All @@ -169,7 +169,7 @@ int mptcp_token_new_connect(struct sock *sk)
}

pr_debug("ssk=%p, local_key=%llu, token=%u, idsn=%llu\n",
sk, subflow->local_key, subflow->token, subflow->idsn);
ssk, subflow->local_key, subflow->token, subflow->idsn);

WRITE_ONCE(msk->token, subflow->token);
__sk_nulls_add_node_rcu((struct sock *)msk, &bucket->msk_chain);
Expand Down

0 comments on commit 294de90

Please sign in to comment.