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 5E745A056A; Wed, 10 Mar 2021 19:49:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2556B22A448; Wed, 10 Mar 2021 19:49:53 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 2C8B640F35 for ; Wed, 10 Mar 2021 19:49:52 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id a188so12735653pfb.4 for ; Wed, 10 Mar 2021 10:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gNmQd0962ZMdjhtdIiNV3A/gDgi1vHBQkOnDPDEecKU=; b=Q4ByBWM84WlLAyMzlIe/j3bmv+geuSPbIGlupSeT4TwirKLe3gFPXxE9oqarxrgyef jylLRitoEI8AHWkhore6QbUb3gdB0hU2C6hu1DsDihHRAiOnEeCePxTzN1fYtSHqe3iy wnh0ajKOqqj1uK6XG8xfkL/LsCh8nBQm4OpCRUwtkzGLsxwibvpHlqNs0K+4TgZhM7YN RfpXoX4iRIFZbrPT94iOITPinWA8GGW1yS32NIE7h7GhlYZSuVRTAh/SjrDCKImnMg4Z KZUgO+dc5oL9t0zF1289EXnZTC55Q8nSY9WXnoR2IqaH/Dq9S237P9FSb1TpEeWGCFIG m9Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gNmQd0962ZMdjhtdIiNV3A/gDgi1vHBQkOnDPDEecKU=; b=oU3nbwvOa3phsQsuCJQZzharp55eFmjWkYh3U2OzpGjtJgQKYN4UCs8PFd/ZzJko9t IaOc/uTp1ssQzSirSBtg6ttOURarv+6m0VKjuq6muzLvNyHw6KuHY9Ivjhtc6Js47ymI zXWgNFE+MtZyY6AySX8B37LPgXjdxOxisaSG0zyM94ZFMZNFEj0Hme9GQNGHkKR8vUhi jAteQvMt4GsL87brLwCHPnHGSbK++ZZkKIOEVTMGCDqAI5ipL1mP+L0XSoB1jlVDHktp W3d2J9gEs/CgjrNVM0sxcwA+ETw3HVbUwHgoJrXsf/BVnftPlN87Mcn/L4m5mOUA8uUG EDnA== X-Gm-Message-State: AOAM531/qggMLiQlnHmTV2+ElVTK7uHI9uW6PVshE6sqL75J4RUhCzcJ JudkMbr6iOAaB8u/wrv2qelKkQ== X-Google-Smtp-Source: ABdhPJwS9Sv6sK0CanBSxmcSNs9dquLY/+kl4guxaGUDApccDFVODUUJ7busbW/DpjLyLlpGybH38g== X-Received: by 2002:a63:e84f:: with SMTP id a15mr3871304pgk.249.1615402191216; Wed, 10 Mar 2021 10:49:51 -0800 (PST) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id y15sm288292pgi.31.2021.03.10.10.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:49:50 -0800 (PST) Date: Wed, 10 Mar 2021 10:49:42 -0800 From: Stephen Hemminger To: Tyler Retzlaff Cc: dev@dpdk.org, anatoly.burakov@intel.com Message-ID: <20210310104942.66ef440e@hermes.local> In-Reply-To: <1615358466-12761-1-git-send-email-roretzla@linux.microsoft.com> References: <1615358466-12761-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [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" On Tue, 9 Mar 2021 22:41:06 -0800 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: 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); The cast is no longer needed, it should be removed.