From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 58BAAA00E6 for ; Fri, 14 Jun 2019 06:21:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AF4D1D4AA; Fri, 14 Jun 2019 06:21:24 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 5F2451D4A9 for ; Fri, 14 Jun 2019 06:21:22 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 9BEB730C117; Thu, 13 Jun 2019 21:21:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 9BEB730C117 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1560486071; bh=PnkRNXk2VHAf3rxVhJYD1IJ2X5/lsLdqPL9zMeDZ67Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rkvw3XeZvH/6ODS0B8ItM9TfmGdWjPZN+W+QJ+d4SJ3GNCUdrJTuNlgPq0wdIyQJc ESddeKql8c0/80W/UJSkvMnuPQJpMtVC551liy5Q+0mcuiRmdOmFruy26d3GHVFj/a KETtn+2PYKM6o+AW5BTGrmc0tn/gwueoVDCEoJM0= Received: from localhost.localdomain (unknown [10.230.44.246]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id C8518AC0737; Thu, 13 Jun 2019 21:21:07 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net Date: Fri, 14 Jun 2019 09:50:57 +0530 Message-Id: <20190614042057.37389-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <2880585.8E5HTlN6fd@xps> References: <2880585.8E5HTlN6fd@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/bnxt: fix compilation error with some compilers 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 driver was defining its own version of roundup which was conflicting with another version defined elsewhere. Change the local definition of roundup to avoid compilation errors. Fixes: c5d09af8aa46 ("net/bnxt: support thor controller") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 5f9c096a7..8fc510351 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3545,7 +3545,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp) bp->ctx = NULL; } -#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#define bnxt_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define min_t(type, x, y) ({ \ type __min1 = (x); \ @@ -3612,7 +3612,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp) return rc; entries = ctx->qp_max_l2_entries; - entries = roundup(entries, ctx->tqm_entries_multiple); + entries = bnxt_roundup(entries, ctx->tqm_entries_multiple); entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring, ctx->tqm_max_entries_per_ring); for (i = 0, ena = 0; i < BNXT_MAX_Q; i++) { -- 2.20.1 (Apple Git-117)