On 3/9/2021 10:41 PM, Tyler Retzlaff wrote:
based on the original commit and the usage of rte_bsf64 it appears the function should always have returned uint32_t instead of int which is consistent with the cast introduced in the return statement.Fixes: 4e261f551986 ("eal: add 64-bit bsf and 32-bit safe bsf functions") Cc: [email protected] Signed-off-by: Tyler Retzlaff <[email protected]> --- lib/librte_eal/include/rte_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 1b630baf1..5e70ee7a8 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -679,7 +679,7 @@ rte_fls_u32(uint32_t x) * @return * least significant set bit in the input parameter. */ -static inline int +static inline uint32_t rte_bsf64(uint64_t v) { return (uint32_t)__builtin_ctzll(v);
Acked-by: Ranjit Menon <[email protected]>

