From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 265952BF4 for ; Thu, 3 Jan 2019 09:14:22 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Jan 2019 10:14:21 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x038EJfU008603; Thu, 3 Jan 2019 10:14:19 +0200 From: Yongseok Koh To: Andy Green Cc: Stephen Hemminger , dpdk stable Date: Thu, 3 Jan 2019 00:13:24 -0800 Message-Id: <20190103081400.14191-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-stable] patch 'eal: explicit cast of builtin for bsf32' has been queued to LTS release 17.11.5 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: Thu, 03 Jan 2019 08:14:22 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/04/19. 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. Yongseok --- >>From 75a3b407cf469b17aad9bd2e8bb7f3defc9028e8 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 12 May 2018 09:58:57 +0800 Subject: [PATCH] eal: explicit cast of builtin for bsf32 [ upstream commit 54a93341ccaaf3665352ddad0807cf3ed40c36f9 ] rte_common.h:416:9: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] return __builtin_ctz(v); ^~~~~~~~~~~~~~~~ The builtin is defined to return int, but we want to return it as uint32_t. Its only defined valid return values are positive integers or zero, which is OK for uint32_t. So just add an explicit cast. Fixes: 03f6bced5bba ("eal: use intrinsic function") Signed-off-by: Andy Green Reviewed-by: Stephen Hemminger --- lib/librte_eal/common/include/rte_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index f24cbe6e2..4485d634e 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -340,7 +340,7 @@ rte_align64pow2(uint64_t v) static inline uint32_t rte_bsf32(uint32_t v) { - return __builtin_ctz(v); + return (uint32_t)__builtin_ctz(v); } /** -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-02 23:59:12.158134897 -0800 +++ 0001-eal-explicit-cast-of-builtin-for-bsf32.patch 2019-01-02 23:59:11.998815000 -0800 @@ -1,8 +1,10 @@ -From 54a93341ccaaf3665352ddad0807cf3ed40c36f9 Mon Sep 17 00:00:00 2001 +From 75a3b407cf469b17aad9bd2e8bb7f3defc9028e8 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 12 May 2018 09:58:57 +0800 Subject: [PATCH] eal: explicit cast of builtin for bsf32 +[ upstream commit 54a93341ccaaf3665352ddad0807cf3ed40c36f9 ] + rte_common.h:416:9: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] @@ -15,7 +17,6 @@ uint32_t. So just add an explicit cast. Fixes: 03f6bced5bba ("eal: use intrinsic function") -Cc: stable@dpdk.org Signed-off-by: Andy Green Reviewed-by: Stephen Hemminger @@ -24,10 +25,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h -index 69e5ed1e3..679f2f184 100644 +index f24cbe6e2..4485d634e 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h -@@ -413,7 +413,7 @@ rte_align64prevpow2(uint64_t v) +@@ -340,7 +340,7 @@ rte_align64pow2(uint64_t v) static inline uint32_t rte_bsf32(uint32_t v) {