diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst index 9904a0e390..de76d69c4e 100644 --- a/doc/guides/rel_notes/release_21_08.rst +++ b/doc/guides/rel_notes/release_21_08.rst @@ -202,6 +202,10 @@ API Changes * eal: ``rte_strscpy`` sets ``rte_errno`` to ``E2BIG`` in case of string truncation. +* eal: ``rte_bsf32_safe`` now takes a 32-bit value for its first argument. + This fixes warnings about loss of precision + when used with some compilers settings. + * eal: ``rte_power_monitor`` and the ``rte_power_monitor_cond`` struct changed to use a callback mechanism. diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index d5a32c66a5..99eb5f1820 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -623,7 +623,7 @@ rte_bsf32(uint32_t v) * Returns 0 if ``v`` was 0, otherwise returns 1. */ static inline int -rte_bsf32_safe(uint64_t v, uint32_t *pos) +rte_bsf32_safe(uint32_t v, uint32_t *pos) { if (v == 0) return 0;