From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14F1145D7F; Thu, 28 Nov 2024 02:54:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D63C54029C; Thu, 28 Nov 2024 02:54:15 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6B2D140151 for ; Thu, 28 Nov 2024 02:54:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 80C1B2053048; Wed, 27 Nov 2024 17:54:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 80C1B2053048 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1732758853; bh=Zy715LPmUafVzp5aKNwN+PHa7IWtNxjKkIGNSd8R4GI=; h=From:To:Cc:Subject:Date:From; b=mKn1kw4cMon1KJXsmFj1KYDDtPHKwbDvjM+GgztPL+7O5bR3FQnVpe85i3R8buB1a 0CbBfENLTuCUSj+JLLS8JY5KaEOxmYMDXu6FkccOJglB9bQjmqzeaINB/1yEBqqU1o SAiRPqyFcLDpSO6ZX9DfdkLWtA0XJ+Jg6FovpqTs= From: Andre Muezerie To: Akhil Goyal , Fan Zhang Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 1/2] lib/cryptodev: avoid implicit conversion to 64 bit number Date: Wed, 27 Nov 2024 17:53:56 -0800 Message-Id: <1732758837-6350-1-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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