From: Andre Muezerie <andremue@linux.microsoft.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, Andre Muezerie <andremue@linux.microsoft.com>
Subject: [PATCH 1/2] lib/cryptodev: avoid implicit conversion to 64 bit number
Date: Wed, 27 Nov 2024 17:53:56 -0800 [thread overview]
Message-ID: <1732758837-6350-1-git-send-email-andremue@linux.microsoft.com> (raw)
MSVC issues the warning below:
../lib/cryptodev/rte_cryptodev.c(623): 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.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
lib/cryptodev/rte_cryptodev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 85a4b46ac9..a49b0662f3 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -620,7 +620,7 @@ rte_cryptodev_asym_xform_capability_check_hash(
{
bool ret = false;
- if (capability->hash_algos & (1 << hash))
+ if (capability->hash_algos & RTE_BIT64(hash))
ret = true;
rte_cryptodev_trace_asym_xform_capability_check_hash(
--
2.47.0.vfs.0.3
next reply other threads:[~2024-11-28 1:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 1:53 Andre Muezerie [this message]
2024-11-28 1:53 ` [PATCH 2/2] lib/hash: " Andre Muezerie
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=1732758837-6350-1-git-send-email-andremue@linux.microsoft.com \
--to=andremue@linux.microsoft.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.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).