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 423724613A; Mon, 27 Jan 2025 18:16:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27F9F406FF; Mon, 27 Jan 2025 18:16:32 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 9D76340698 for ; Mon, 27 Jan 2025 18:16:30 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 6C82B2091E; Mon, 27 Jan 2025 18:16:30 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v2 2/2] lib/hash: avoid implicit conversion to 64 bit number Date: Mon, 27 Jan 2025 18:16:29 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F9F7@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <1737993833-22957-2-git-send-email-andremue@linux.microsoft.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2 2/2] lib/hash: avoid implicit conversion to 64 bit number Thread-Index: Adtw1RU41qIzG4BARkuLdCqeIB5qLwAChezw References: <1732758837-6350-1-git-send-email-andremue@linux.microsoft.com> <1737993833-22957-1-git-send-email-andremue@linux.microsoft.com> <1737993833-22957-2-git-send-email-andremue@linux.microsoft.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Andre Muezerie" Cc: , , 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 > From: Andre Muezerie [mailto:andremue@linux.microsoft.com] > Sent: Monday, 27 January 2025 17.04 >=20 > MSVC issues the warnings below: >=20 > 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?) >=20 > 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. >=20 > 2) ../lib/hash/rte_thash.c(568): warning C4334: '<<': > result of 32-bit shift implicitly converted to 64 bits > (was 64-bit shift intended?) >=20 > Instead of multiplying sizeof(uint32_t) by the result of shifting > "1", sizeof(uint32_t) can be shifted directly. >=20 > Signed-off-by: Andre Muezerie > Acked-by: Vladimir Medvedkin > Acked-by: Bruce Richardson > --- Reviewed-by: Morten Br=F8rup