From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E922A04FD; Tue, 14 Jan 2020 01:26:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 226C91C24B; Tue, 14 Jan 2020 01:26:54 +0100 (CET) Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) by dpdk.org (Postfix) with ESMTP id 234F11C24B for ; Tue, 14 Jan 2020 01:26:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1984; q=dns/txt; s=iport; t=1578961613; x=1580171213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=prOsGp04rmYs3XGbyJzi4ioYoDKJ0NRQ76TFVLcsGek=; b=gZAJrzNlnoKzdQch7SRoeLLsEwdxfFkefvNH8p/XnQWnNix3jU9rGDoc zyRWuVVMQ4VLIARRM8Dyi695rJVxPobndFKyXqKCegwAV6uETanj3YzJk LjMY9rH2XdTqiuX8rnmaSmeCNltohwM1F2nhTncHZa2ryVF1h+b8MH1IP w=; X-IronPort-AV: E=Sophos;i="5.69,430,1571702400"; d="scan'208";a="404281342" Received: from alln-core-10.cisco.com ([173.36.13.132]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 14 Jan 2020 00:26:52 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-10.cisco.com (8.15.2/8.15.2) with ESMTP id 00E0QqIm016468; Tue, 14 Jan 2020 00:26:52 GMT Received: by cisco.com (Postfix, from userid 392789) id E3B5320F2003; Mon, 13 Jan 2020 16:26:51 -0800 (PST) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, John Daley , Hyong Youb Kim Date: Mon, 13 Jan 2020 16:24:51 -0800 Message-Id: <20200114002451.16248-3-johndale@cisco.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200114002451.16248-1-johndale@cisco.com> References: <20200114002451.16248-1-johndale@cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: alln-core-10.cisco.com Subject: [dpdk-dev] [PATCH] net/enic: move macro to the correct file 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" Move a macro from a widely included header file to a header file used only by the one caller of the macro. Signed-off-by: John Daley Reviewed-by: Hyong Youb Kim --- drivers/net/enic/enic_compat.h | 10 ---------- drivers/net/enic/enic_res.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h index eb1fc941e4..7741273037 100644 --- a/drivers/net/enic/enic_compat.h +++ b/drivers/net/enic/enic_compat.h @@ -73,14 +73,4 @@ static inline void writel(unsigned int val, volatile void __iomem *addr) rte_write32(val, addr); } -#define min_t(type, x, y) ({ \ - type __min1 = (x); \ - type __min2 = (y); \ - __min1 < __min2 ? __min1 : __min2; }) - -#define max_t(type, x, y) ({ \ - type __max1 = (x); \ - type __max2 = (y); \ - __max1 > __max2 ? __max1 : __max2; }) - #endif /* _ENIC_COMPAT_H_ */ diff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h index 9700b0d3e6..b3bd4b27d3 100644 --- a/drivers/net/enic/enic_res.h +++ b/drivers/net/enic/enic_res.h @@ -11,6 +11,16 @@ #include "vnic_wq.h" #include "vnic_rq.h" +#define min_t(type, x, y) ({ \ + type __min1 = (x); \ + type __min2 = (y); \ + __min1 < __min2 ? __min1 : __min2; }) + +#define max_t(type, x, y) ({ \ + type __max1 = (x); \ + type __max2 = (y); \ + __max1 > __max2 ? __max1 : __max2; }) + #define ENIC_MIN_WQ_DESCS 64 #define ENIC_MAX_WQ_DESCS 4096 #define ENIC_MIN_RQ_DESCS 64 @@ -55,7 +65,6 @@ #define ENIC_SETTING(enic, f) ((enic->config.flags & VENETF_##f) ? 1 : 0) - struct enic; int enic_get_vnic_config(struct enic *); -- 2.22.0