Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2980834rwi; Fri, 28 Oct 2022 14:03:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6CQOveWu3OWG2OhnsbVf0wGKNA71bNpDVTrUPoRdtEENfAMTPoY3Q9PIp+W6sYHATkOy1m X-Received: by 2002:a05:6402:10c2:b0:45c:3c87:721f with SMTP id p2-20020a05640210c200b0045c3c87721fmr1315927edu.251.1666991035419; Fri, 28 Oct 2022 14:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666991035; cv=none; d=google.com; s=arc-20160816; b=a+wcX4TKBw5i2RFZi2jjudMcBwDYkiJMr4rg5nz+f4U6CbNoGleFE6v69Wutbbycl8 Ux7+gbIaZvMhnOYT0zDrJS27KMCu1VGM/iQ0Jhx69cRw80Fzq98974suc73DkMfj6oV9 T08bNLrJs1SzfNJVyU9ZBBpoUivsX3qRLQDFiL3zv6vbuSMQFurjT0q7RkAr1FV4KTjR Qdl3bpwtOkhjtyVDf56Rmuua6XFHTB1jelIOLHixoTf1Y86lW5lvA2+rB0cdQBeK94Sk tFVtUmQoIoz70VnTyH9kAHa2JHRLt/wvFX2j4dyFrXt4+xmkMlT0hCEqsVY6gBFgjm2K 6BMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+LiNz8/pn/8j9mZ/5KeJ2Su0FpCTUjvmPipCA7lS414=; b=DL85fbS5VB323p+yI9+5eEtXW6P9NyEkqQRuQ5/cCZkoxxeYbDDpNerQ14MuYi12CF nmelnonJExOsqHuq2jYZRPF+cE8mJ2KwVwBB1QpWFbTiZ3myqqpPnz2zJkefrd+YNG9T CWnvvE/ACvyHPIEWrGX0IX38YvxTsEr98yPdAMvT/m52xfBBjjaLPHiREnYOfo+7is16 llBRGbw2FC8s3K5zWkbBJ5xcvG6+oKQvrEy1Bo7WUxEd7G9DAK/FUdOe2KnPBPpW5FrZ DpLmtHh2n8JxFcWZiWsmSKpw2GU8LvA907d4KLU84NTRvVUx5JUUyvMlwnRsxaNcdllZ ffYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EOjxAwcK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg8-20020a170907970800b0078dcd448f97si2511177ejc.801.2022.10.28.14.03.28; Fri, 28 Oct 2022 14:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EOjxAwcK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiJ1Usi (ORCPT + 99 others); Fri, 28 Oct 2022 16:48:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbiJ1Usa (ORCPT ); Fri, 28 Oct 2022 16:48:30 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E68982475E0; Fri, 28 Oct 2022 13:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666990108; x=1698526108; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DwAZgIO79UPglttMtSBhU1lsvyVEj9oh2vUqhHtM8XM=; b=EOjxAwcKb9nhZ2wqArps5mUYBzBNQK6Wyy96VbEPXWuIBd/9SefU2q2m 3GZsR/HzjIAEi9BNh2ZMZMNsEslOZnrsM5E6P1XG347MEkGx37n0bI+yB sWbqDZ1ymeleppRAuhwjbvs6SVCWDdnXpcjoewsjY8t2os5HmVo0nIQSQ N6c7V+F9tq0GzxQM3JjOx5XUMcF4YdIjIf61kdjmfMdOP5/EJdcbwL1mU TEtgE5CYJcZtzpT3mZUBYjsvoUzNwkC/HyCQRgk9pbqIUe8g6Z+9UEooR EhFbKrF48dOFvC2WWCqe9uG8kQ+Z1AeeRTuqSqT+bNyRA2BZ5ieEbvO7X A==; X-IronPort-AV: E=McAfee;i="6500,9779,10514"; a="291885104" X-IronPort-AV: E=Sophos;i="5.95,222,1661842800"; d="scan'208";a="291885104" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 13:48:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10514"; a="962159823" X-IronPort-AV: E=Sophos;i="5.95,222,1661842800"; d="scan'208";a="962159823" Received: from bwalker-desk.ch.intel.com ([143.182.136.162]) by fmsmga005.fm.intel.com with ESMTP; 28 Oct 2022 13:48:26 -0700 From: Ben Walker To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Jiang Subject: [PATCH v6 2/7] dmaengine: Move dma_set_tx_state to the provider API header Date: Fri, 28 Oct 2022 13:48:07 -0700 Message-Id: <20221028204812.1772736-3-benjamin.walker@intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221028204812.1772736-1-benjamin.walker@intel.com> References: <20220829203537.30676-1-benjamin.walker@intel.com> <20221028204812.1772736-1-benjamin.walker@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Reviewed-by: Dave Jiang --- 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 c55dcae7dc620..5ae881729b620 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1444,17 +1444,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); -- 2.37.3