[dpdk-stable] patch 'eal: explicit cast of builtin for bsf32' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Thu Jan 3 09:13:24 CET 2019
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 <andy at warmcat.com>
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 <andy at warmcat.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
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 <andy at warmcat.com>
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 at dpdk.org
Signed-off-by: Andy Green <andy at warmcat.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
@@ -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)
{
More information about the stable
mailing list