From patchwork Tue Feb 1 20:38:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Walker X-Patchwork-Id: 12732259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 384B0C433EF for ; Tue, 1 Feb 2022 20:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242119AbiBAUki (ORCPT ); Tue, 1 Feb 2022 15:40:38 -0500 Received: from mga05.intel.com ([192.55.52.43]:16574 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242673AbiBAUjM (ORCPT ); Tue, 1 Feb 2022 15:39:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643747952; x=1675283952; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z+SqRmGKUcvzNP/fhFS85ZNPzt0gP/of2l6epuXHhcw=; b=Hf6nR1TYMuFFgKiwzDgaf3WSQphOG0THCdfPViXxe4UG14MquzC7iqT/ xfVda9b8CGYVqoIauIVns5Z0BVhDRNoTyEE9Op+1p754C0LvREiVgN1Ig y/KfSg2mnbrP/hRivAz6SL2UK8woL14vNKhDulsu44fdHsRxbROsVN313 15OsR4RhC3Spt7S8lSslllNnx7ePHrQg//MjZvJzY6mOvKzHUFZ/kxGGI gKw6JU6TCGZcZG86p8uuBtPdFo1URL94zGk78tnK6ZU9yzw89wCzt5z5x KE2YsRqoXt9gHFa511qGmLWR3ejxtJ2Vfxm5nmZsklKE0oU/n1R2L19Mj w==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="334143882" X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="334143882" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 12:39:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="479820765" Received: from bwalker-desk.ch.intel.com ([143.182.137.151]) by orsmga003.jf.intel.com with ESMTP; 01 Feb 2022 12:39:10 -0800 From: Ben Walker To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, dave.jiang@intel.com, Ben Walker Subject: [RESEND 02/10] dmaengine: Move dma_set_tx_state to the provider API header Date: Tue, 1 Feb 2022 13:38:05 -0700 Message-Id: <20220201203813.3951461-3-benjamin.walker@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220201203813.3951461-1-benjamin.walker@intel.com> References: <20220201203813.3951461-1-benjamin.walker@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org This is only used by DMA providers, not DMA clients. Move it next to the other cookie utility functions. Signed-off-by: Ben Walker --- drivers/dma/dmaengine.h | 11 +++++++++++ include/linux/dmaengine.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h index a2ce377e9ed0f..e72876a512a39 100644 --- a/drivers/dma/dmaengine.h +++ b/drivers/dma/dmaengine.h @@ -90,6 +90,17 @@ static inline enum dma_status dma_cookie_status(struct dma_chan *chan, return DMA_IN_PROGRESS; } +static inline void dma_set_tx_state(struct dma_tx_state *st, + dma_cookie_t last, dma_cookie_t used, u32 residue) +{ + if (!st) + return; + + st->last = last; + st->used = used; + st->residue = residue; +} + static inline void dma_set_residue(struct dma_tx_state *state, u32 residue) { if (state) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 194e334b33bbc..8c4934bc038ec 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1457,17 +1457,6 @@ static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan, return status; } -static inline void -dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue) -{ - if (!st) - return; - - st->last = last; - st->used = used; - st->residue = residue; -} - #ifdef CONFIG_DMA_ENGINE struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);