From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id CE5761B3F5 for ; Fri, 23 Nov 2018 11:30:14 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FAF3753E0; Fri, 23 Nov 2018 10:30:14 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2077F413C; Fri, 23 Nov 2018 10:30:12 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Date: Fri, 23 Nov 2018 10:26:52 +0000 Message-Id: <20181123102713.17309-48-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 23 Nov 2018 10:30:14 +0000 (UTC) Subject: [dpdk-stable] patch 'lib: fix shifting 32-bit signed variable 31 times' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 10:30:15 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 085051008e491e50fe91b1863003f41b6281127e Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Sun, 28 Oct 2018 01:08:44 +0000 Subject: [PATCH] lib: fix shifting 32-bit signed variable 31 times [ upstream commit 9eb06884120091a21fdfc35850167f6245c2109e ] Fix cppcheck warning by marking variable as unsigned. Fixes: dc276b5780c2 ("acl: new library") Fixes: 986ff526fb84 ("net: add CRC computation API") Signed-off-by: Ferruh Yigit --- lib/librte_acl/acl_gen.c | 2 +- lib/librte_net/rte_net_crc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_acl/acl_gen.c b/lib/librte_acl/acl_gen.c index bed66be08..35a0140b4 100644 --- a/lib/librte_acl/acl_gen.c +++ b/lib/librte_acl/acl_gen.c @@ -164,5 +164,5 @@ acl_count_sequential_groups(struct rte_acl_bitset *bits, int zero_one) for (n = QRANGE_MIN; n < UINT8_MAX + 1; n++) { if (bits->bits[n / (sizeof(bits_t) * 8)] & - (1 << (n % (sizeof(bits_t) * 8)))) { + (1U << (n % (sizeof(bits_t) * 8)))) { if (zero_one == 1 && last_bit != 1) ranges++; diff --git a/lib/librte_net/rte_net_crc.c b/lib/librte_net/rte_net_crc.c index 73ac3a959..dca0830e2 100644 --- a/lib/librte_net/rte_net_crc.c +++ b/lib/librte_net/rte_net_crc.c @@ -70,6 +70,6 @@ reflect_32bits(uint32_t val) for (i = 0; i < 32; i++) - if ((val & (1 << i)) != 0) - res |= (uint32_t)(1 << (31 - i)); + if ((val & (1U << i)) != 0) + res |= (uint32_t)(1U << (31 - i)); return res; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:55.508423003 +0000 +++ 0048-lib-fix-shifting-32-bit-signed-variable-31-times.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,13 +1,14 @@ -From 9eb06884120091a21fdfc35850167f6245c2109e Mon Sep 17 00:00:00 2001 +From 085051008e491e50fe91b1863003f41b6281127e Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Sun, 28 Oct 2018 01:08:44 +0000 Subject: [PATCH] lib: fix shifting 32-bit signed variable 31 times +[ upstream commit 9eb06884120091a21fdfc35850167f6245c2109e ] + Fix cppcheck warning by marking variable as unsigned. Fixes: dc276b5780c2 ("acl: new library") Fixes: 986ff526fb84 ("net: add CRC computation API") -Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit ---