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 33A0746135; Mon, 27 Jan 2025 17:04:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA0A44027D; Mon, 27 Jan 2025 17:04:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 143BB40275 for ; Mon, 27 Jan 2025 17:04:01 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 5A7452109A5E; Mon, 27 Jan 2025 08:04:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5A7452109A5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1737993840; bh=SEDCL6KV2Y0m8XO0TaIYVXVvwBM9dY1KQfJN1mGGHvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gk+OD7nNn4M4XgP6ypUGYEPuYVGS1gKHXfUJxOOuMKXs3K9ql4ccIRKax7NHbpeUa pffyXUf6+pp2Vd736XS8bYe7hA2duzq/Nf+8kU0dR/QDUul9cKJSVXutpkGa4iNMjr Dmy76c+y0W9H6uM6yfkUu3giqEm7In8bRgKUwVfY= From: Andre Muezerie To: andremue@linux.microsoft.com Cc: dev@dpdk.org, fanzhang.oss@gmail.com, gakhil@marvell.com, mb@smartsharesystems.com Subject: [PATCH v2 1/2] lib/cryptodev: avoid implicit conversion to 64 bit number Date: Mon, 27 Jan 2025 08:03:52 -0800 Message-Id: <1737993833-22957-1-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1732758837-6350-1-git-send-email-andremue@linux.microsoft.com> References: <1732758837-6350-1-git-send-email-andremue@linux.microsoft.com> 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 Acked-by: Akhil Goyal --- 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.2.vfs.0.1