net/mptcp/options.c | 3 +-- net/mptcp/subflow.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-)
Drop the unneeded type casts to 'unsigned long long' for printing out the
hmac values in add_addr_hmac_valid() and subflow_thmac_valid().
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
net/mptcp/options.c | 3 +--
net/mptcp/subflow.c | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 7b615dc10897..670364cd455f 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1085,8 +1085,7 @@ static bool add_addr_hmac_valid(struct mptcp_sock *msk,
&mp_opt->addr);
pr_debug("msk=%p, ahmac=%llu, mp_opt->ahmac=%llu\n",
- msk, (unsigned long long)hmac,
- (unsigned long long)mp_opt->ahmac);
+ msk, hmac, mp_opt->ahmac);
return hmac == mp_opt->ahmac;
}
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 88ee94adc38c..485f00dcaf84 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -344,9 +344,7 @@ static bool subflow_thmac_valid(struct mptcp_subflow_context *subflow)
thmac = get_unaligned_be64(hmac);
pr_debug("subflow=%p, token=%u, thmac=%llu, subflow->thmac=%llu\n",
- subflow, subflow->token,
- (unsigned long long)thmac,
- (unsigned long long)subflow->thmac);
+ subflow, subflow->token, thmac, subflow->thmac);
return thmac == subflow->thmac;
}
--
2.31.1
On Mon, 7 Feb 2022, Geliang Tang wrote:
> Drop the unneeded type casts to 'unsigned long long' for printing out the
> hmac values in add_addr_hmac_valid() and subflow_thmac_valid().
>
The type specifiers are expecting a 64 bit value (on 32 or 64 bit
platforms), so there isn't a need for the casts that I can see. I pushed
this to my git.kernel.org repo to trigger a kbuild run across a whole
bunch of platforms, just in case.
Ok to merge to the export branch:
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/options.c | 3 +--
> net/mptcp/subflow.c | 4 +---
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 7b615dc10897..670364cd455f 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -1085,8 +1085,7 @@ static bool add_addr_hmac_valid(struct mptcp_sock *msk,
> &mp_opt->addr);
>
> pr_debug("msk=%p, ahmac=%llu, mp_opt->ahmac=%llu\n",
> - msk, (unsigned long long)hmac,
> - (unsigned long long)mp_opt->ahmac);
> + msk, hmac, mp_opt->ahmac);
>
> return hmac == mp_opt->ahmac;
> }
> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> index 88ee94adc38c..485f00dcaf84 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -344,9 +344,7 @@ static bool subflow_thmac_valid(struct mptcp_subflow_context *subflow)
>
> thmac = get_unaligned_be64(hmac);
> pr_debug("subflow=%p, token=%u, thmac=%llu, subflow->thmac=%llu\n",
> - subflow, subflow->token,
> - (unsigned long long)thmac,
> - (unsigned long long)subflow->thmac);
> + subflow, subflow->token, thmac, subflow->thmac);
>
> return thmac == subflow->thmac;
> }
> --
> 2.31.1
>
>
>
--
Mat Martineau
Intel
Hi Geliang, Mat, On 07/02/2022 11:06, Geliang Tang wrote: > Drop the unneeded type casts to 'unsigned long long' for printing out the > hmac values in add_addr_hmac_valid() and subflow_thmac_valid(). Thank you for your patch and the review! Now in our tree (feat. for net-next) with Mat's RvB tag: - d59d0b9cb2a7: mptcp: drop unneeded type casts for hmac - Results: e98f6976dd01..a50f1ded83fa Builds and tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220208T094354 https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net
© 2016 - 2026 Red Hat, Inc.