From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const Date: Fri, 22 Mar 2019 19:09:56 +0100 Message-ID: <719a6842-d8ca-a78e-945d-89eaca1a6626@redhat.com> References: <20190321195910.11140-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Stephen Hemminger , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BE8B51B729 for ; Fri, 22 Mar 2019 19:10:00 +0100 (CET) In-Reply-To: <20190321195910.11140-1-stephen@networkplumber.org> Content-Language: en-US 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 3/21/19 8:59 PM, Stephen Hemminger wrote: > The divisor is not modified here. Doesn't really matter for optimizaton > since the function is inline already; but helps with expressing > intent. > > Signed-off-by: Stephen Hemminger > --- > lib/librte_eal/common/include/rte_reciprocal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h > index 3492c73bafea..63e16fde0aa8 100644 > --- a/lib/librte_eal/common/include/rte_reciprocal.h > +++ b/lib/librte_eal/common/include/rte_reciprocal.h > @@ -77,7 +77,7 @@ mullhi_u64(uint64_t x, uint64_t y) > } > > static __rte_always_inline uint64_t > -rte_reciprocal_divide_u64(uint64_t a, struct rte_reciprocal_u64 *R) > +rte_reciprocal_divide_u64(uint64_t a, const struct rte_reciprocal_u64 *R) > { > uint64_t t = mullhi_u64(a, R->m); > > Reviewed-by: Maxime Coquelin