[1/2] lib/cryptodev: avoid implicit conversion to 64 bit number
Checks
Commit Message
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(-)
Comments
> 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>
Acked-by: Akhil Goyal <gakhil@marvell.com>
1/2 patch Applied to dpdk-next-crypto
2/2 patch will be taken via main tree.
Thanks.
@@ -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(