From patchwork Thu Mar 21 19:59:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 51489 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A02F11B6B6; Thu, 21 Mar 2019 20:59:15 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 9D7111B6A1 for ; Thu, 21 Mar 2019 20:59:14 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id a3so4965327pff.11 for ; Thu, 21 Mar 2019 12:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=50XLx9YSJSl0pJQ08lzQh47+Sh9V4HGo2dFAIvSyB0E=; b=PJ7wXwSXSc4qq5r2G0NhQvIXBAejoC3OMivZCSsRfXAQJrWN11JoforMzWupimbP/S loPj7vI4XvmC92sAEj+D9PoejOwQz1xBi+lA8a5Kk142sUqU5anZrfHlsZO0txUI1svm zGfo7lHqKdBh8fuLnvyllYU8dCNQy19PPZYPJwCLoOAh8hyRUTX2ve2EwJ8XMATx7HjW CT+NkDraN+GCsHNo1mO6YXLNR6ZIVBm/6PCPOjune5DZb2C8t7oDGz2Rks9eQL8smmnr LcBU0/oX3H68CH5MjJ9ycx6QyWmkeFcbjzJBjDCgU6JQ0Q6PSRzSVOCUIYOSGIUWzu45 ip2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=50XLx9YSJSl0pJQ08lzQh47+Sh9V4HGo2dFAIvSyB0E=; b=V3J0UdTCh9rtL+23YdhvJ5VsMQVYCHQmb7xJjJDm9EgolEOzxVLrn9n4Qfu/57vqkF rZa/nGkn+G1vohe2uEfCInW00mi/F/SL7sU3pKC2dQIXIBSpN9iSwQ83yhs1N4Hi9nu9 5+DGHHy3E4vSqfMjpUPFowAP8zbMJ19KGL+WYozm6AJPYCrbCG1Zyw7/W2SJeFtB+O3h Kg44LmVmJRn08n9AdCVCYiMqTku4hF9VZA6FR9vfYzeBTkJiwW01PvNhnj40NwneAHss YaqKvxyShJ+9QNIxY0L0NUtWwvzK9Z8UVBdiLUTqkXFOBJKcy5L1LhyL/ctaFo0S9SLa Tkvg== X-Gm-Message-State: APjAAAUeEHti8JPVzLQKQan5x05uyK8SXpxM01xu2p3UKiQeLXoxKPdA DIR7TU+h4PDB0f0yf8g7zw7cu63antmQxw== X-Google-Smtp-Source: APXvYqwxvBu+EQaMIj/7ApMgQIjvxMgAuKOTrIwk+6FIg9VyMkMaRMNpkiz4ZIrGmeFlAYSUb3t/uQ== X-Received: by 2002:a63:e14e:: with SMTP id h14mr4952681pgk.184.1553198353408; Thu, 21 Mar 2019 12:59:13 -0700 (PDT) Received: from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j14sm8229043pfn.77.2019.03.21.12.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 12:59:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 21 Mar 2019 12:59:10 -0700 Message-Id: <20190321195910.11140-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 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 Reviewed-by: Maxime Coquelin --- 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);