From patchwork Wed Sep 27 08:31:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Vecera X-Patchwork-Id: 13400378 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C584F13ADF for ; Wed, 27 Sep 2023 08:31:56 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA6C2E5 for ; Wed, 27 Sep 2023 01:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695803514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tBPzqP7mvSaTje2m9Bq5UEE3uForpA2ubHE/HpdjFVQ=; b=QAVcRiRaUUlxFjn+yRQuRH7mspZW9Pce/23X4cfhdMF+VOzMIk3wOj6otgR2n/0MEF1Euj /Ha7/KsbtOebZS1eg6EZ5Rv/IYsHFAjyQa2o69w1TQj+nPQcYw8L1AynXVzwLpb8n6dXqS Cx5h2OCpXPphRDKIHgL3oeVzkNE4Ino= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-OAH35cB6OoKOLhD-csj3-g-1; Wed, 27 Sep 2023 04:31:50 -0400 X-MC-Unique: OAH35cB6OoKOLhD-csj3-g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 104E8185A790; Wed, 27 Sep 2023 08:31:50 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.45.225.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 512CA2156702; Wed, 27 Sep 2023 08:31:48 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: poros@redhat.com, mschmidt@redhat.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, przemyslaw.kitszel@intel.com Subject: [PATCH net-next v2 6/9] i40e: Move memory allocation structures to i40e_alloc.h Date: Wed, 27 Sep 2023 10:31:32 +0200 Message-ID: <20230927083135.3237206-7-ivecera@redhat.com> In-Reply-To: <20230927083135.3237206-1-ivecera@redhat.com> References: <20230927083135.3237206-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Structures i40e_dma_mem & i40e_virt_mem are defined i40e_osdep.h while memory allocation functions that use them are declared in i40e_alloc.h Move them there. Signed-off-by: Ivan Vecera Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 1 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_osdep.h | 12 ------------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.h b/drivers/net/ethernet/intel/i40e/i40e_adminq.h index 267f2e0a21ce..1c3d2bc5c3f7 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.h +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.h @@ -4,6 +4,7 @@ #ifndef _I40E_ADMINQ_H_ #define _I40E_ADMINQ_H_ +#include "i40e_alloc.h" #include "i40e_osdep.h" #include "i40e_adminq_cmd.h" diff --git a/drivers/net/ethernet/intel/i40e/i40e_alloc.h b/drivers/net/ethernet/intel/i40e/i40e_alloc.h index 4b2d8da048c6..e0dde326255d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_alloc.h +++ b/drivers/net/ethernet/intel/i40e/i40e_alloc.h @@ -4,8 +4,22 @@ #ifndef _I40E_ALLOC_H_ #define _I40E_ALLOC_H_ +#include + struct i40e_hw; +/* memory allocation tracking */ +struct i40e_dma_mem { + void *va; + dma_addr_t pa; + u32 size; +}; + +struct i40e_virt_mem { + void *va; + u32 size; +}; + /* prototype for functions used for dynamic memory allocation */ int i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h index 70cac3bb31ec..fd18895cfb56 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_osdep.h +++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h @@ -29,18 +29,6 @@ struct device *i40e_hw_to_dev(struct i40e_hw *hw); #define rd64(a, reg) readq((a)->hw_addr + (reg)) #define i40e_flush(a) readl((a)->hw_addr + I40E_GLGEN_STAT) -/* memory allocation tracking */ -struct i40e_dma_mem { - void *va; - dma_addr_t pa; - u32 size; -}; - -struct i40e_virt_mem { - void *va; - u32 size; -}; - #define i40e_debug(h, m, s, ...) \ do { \ if (((m) & (h)->debug_mask)) \