patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal: explicit cast of builtin for bsf32' has been queued to LTS release 17.11.5
@ 2019-01-03  8:13 Yongseok Koh
  2019-01-03  8:13 ` [dpdk-stable] patch 'eal: explicit cast of core id when getting index' " Yongseok Koh
                   ` (35 more replies)
  0 siblings, 36 replies; 37+ messages in thread
From: Yongseok Koh @ 2019-01-03  8:13 UTC (permalink / raw)
  To: Andy Green; +Cc: Stephen Hemminger, dpdk stable

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@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@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@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@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@dpdk.org
 
 Signed-off-by: Andy Green <andy@warmcat.com>
 Reviewed-by: Stephen Hemminger <stephen@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)
  {

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2019-01-03  8:15 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  8:13 [dpdk-stable] patch 'eal: explicit cast of builtin for bsf32' has been queued to LTS release 17.11.5 Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: explicit cast of core id when getting index' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: declare trace buffer at top of own block' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'spinlock/x86: move stack declaration before code' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net: move stack variable at top of VLAN strip function' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'ethdev: explicit cast of buffered Tx number' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'hash: move stack declaration at top of CRC32c function' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'hash: explicit casts for truncation in CRC32c' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'bus/pci: replace strncpy by strlcpy' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'bus/dpaa: fix inconsistent struct alignment' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net/nfp: fix memcpy out of source range' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net/qede: replace strncpy by strlcpy' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net/qede: fix strncpy' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net/sfc: make sure that stats name is nul-terminated' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'app/procinfo: fix sprintf overrun' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'devtools: provide more generic grep in git check' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: explicit cast of strlcpy return' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: fix casts in random functions' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: explicit cast in constant byte swap' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'ring: remove useless variables' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'ring: remove signed type flip-flopping' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: fix reference counter integer promotion' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: explicit casts of reference counter' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: explicit cast of headroom on reset' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: explicit cast of size on detach' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net: explicit cast of multicast bit clearing' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net: explicit cast of IP checksum to 16-bit' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net: explicit cast of protocol in IPv6 checksum' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'ethdev: explicit cast of queue count return' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal/x86: fix type of variable in memcpy function' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'eal: explicit cast in rwlock functions' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'net: explicit cast in L4 checksum' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: fix type of private size in detach' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: fix type of variables in linearize function' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: avoid implicit demotion in 64-bit arithmetic' " Yongseok Koh
2019-01-03  8:13 ` [dpdk-stable] patch 'mbuf: avoid integer promotion in prepend/adj/chain' " Yongseok Koh
2019-01-03  8:14 ` [dpdk-stable] patch 'ethdev: fix type and scope of variables in Rx burst' " Yongseok Koh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).