From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C11D6A0567; Wed, 10 Mar 2021 07:41:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B94822A2D6; Wed, 10 Mar 2021 07:41:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 683544068C for ; Wed, 10 Mar 2021 07:41:12 +0100 (CET) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 92F37208CF95; Tue, 9 Mar 2021 22:41:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 92F37208CF95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1615358471; bh=vYh6fY5qZhghX/zByCnsZNtpzgUnVUjfh2pal7u12S8=; h=From:To:Cc:Subject:Date:From; b=h+pCRzS7nJFiA00D6+RdMAi0rFixEobPh1gPYG4MvzwTIGfilufaIV+ye9HTdNewL FqEbqSgX18HshQLS/uet6D7xUEi7w1oENudlLvrv77RkfI4Tz00wGzw6BMlZL/s96W Nlwx6j64HSreJvLtpYj3IOve2OxrnlQybP0x5r4Q= From: Tyler Retzlaff To: dev@dpdk.org Cc: anatoly.burakov@intel.com Date: Tue, 9 Mar 2021 22:41:06 -0800 Message-Id: <1615358466-12761-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] librte_eal/common: fix return type of rte_bsf64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: anatoly.burakov@intel.com Signed-off-by: Tyler Retzlaff --- 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); -- 2.30.0.vfs.0.2