DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: Andre Muezerie <andremue@linux.microsoft.com>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH 2/2] lib/hash: avoid implicit conversion to 64 bit number
Date: Wed, 22 Jan 2025 16:15:17 +0000	[thread overview]
Message-ID: <006d07d8-7c4a-441b-a1d1-d8aa6002b0bc@intel.com> (raw)
In-Reply-To: <1732758837-6350-2-git-send-email-andremue@linux.microsoft.com>

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 28/11/2024 01:53, Andre Muezerie wrote:
> MSVC issues the warnings below:
>
> 1) ../lib/hash/rte_thash_gf2_poly_math.c(128): warning C4334: '<<':
>      result of 32-bit shift implicitly converted to 64 bits
>      (was 64-bit shift intended?)
>
> The code would be better off by using 64 bit numbers to begin with.
> That eliminates the need for a conversion to 64 bits later.
>
> 2) ../lib/hash/rte_thash.c(568): warning C4334: '<<':
>      result of 32-bit shift implicitly converted to 64 bits
>      (was 64-bit shift intended?)
>
> 1ULL should be used as the result of the bit shift gets multiplied
> by sizeof(uint32_t).
>
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> ---
>   lib/hash/rte_thash.c               | 2 +-
>   lib/hash/rte_thash_gf2_poly_math.c | 6 +++---
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
<snip>

-- 
Regards,
Vladimir


  parent reply	other threads:[~2025-01-22 16:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28  1:53 [PATCH 1/2] lib/cryptodev: " Andre Muezerie
2024-11-28  1:53 ` [PATCH 2/2] lib/hash: " Andre Muezerie
2025-01-22 16:12   ` Bruce Richardson
2025-01-22 21:36     ` Andre Muezerie
2025-01-22 16:15   ` Medvedkin, Vladimir [this message]
2025-01-08 10:28 ` [EXTERNAL] [PATCH 1/2] lib/cryptodev: " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=006d07d8-7c4a-441b-a1d1-d8aa6002b0bc@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=andremue@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sameh.gobriel@intel.com \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).