Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5110478iog; Wed, 22 Jun 2022 12:11:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6il0XPREq71IjDnL/pN61sJ3/APWRGII/iVQjk7kliDUyj6M1FudDLrB5HU9RS6kRvHMb X-Received: by 2002:a17:90a:a44:b0:1ec:70f9:630 with SMTP id o62-20020a17090a0a4400b001ec70f90630mr5142465pjo.91.1655925106249; Wed, 22 Jun 2022 12:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655925106; cv=none; d=google.com; s=arc-20160816; b=PmGPhKUpVwceQ/aXNSEaf9hGUBTw9fz6ZmCtDkm0+Uvy7DVWfce8gmQIOoqDTR9v1N xONwpAYPVQoRxGsClncY1FIVEmxGJWPZu/C98QnCt7/Dh2YGckV4ADILLsd1g28rKzS7 tI7LKlNaxaTkARPe4gbu14b6gq4wakmMonXjayjmxPYB1si2o0/Wa9xU6LZFd6vBTDsi 5dNTM16PGdTlN/vLOCOtbOu+ejjTZu+hFq+sJKagmGZLoi/ZMr9awr09gIg16tqRBwn2 rfm5kIdgh97zNQobFxXIn44EpI4YVh6W3wvntxy2l0Vmmorz5Se8Yj0e0tAlQpcUKepI 9L5Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3ui9oosObN1Ig99U5mYO2tJlx0i0TRnYhsvDEvfA/fw=; b=YrgQJI6Ce6qTCrb0aSYurXlXZuBAZJti5d3vgkr1pmildRZLFI2MsazY70nuMy0RrE KdwiSuFfGWa+PtkPHuipaYLy5Hgi7tT6M+iQC/eFz9j1PfDp4AijOvt6+p92lNEGqS8O cBnES0hVtk1MeXuD+FXpi6gJwy2G4mOv7VMDlSYtelBM1x68vxqpy7jvf0813LhDp5U9 OXwbHNTn3ggT9Mu81cXbOLf4+9LF7AqiImbLtVN9sZcvcLQ5KMx2GKInSxz4CD65LsM2 0JQgfishzOP9seRJZnnHRiToQfbZ2fAjO+g/0uf3dxw7X6FiFeoRuEwhL6/ArDJwRCtH Kp7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I0FPSNRo; 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 g10-20020a63f40a000000b00408c34d632dsi23483716pgi.157.2022.06.22.12.11.32; Wed, 22 Jun 2022 12:11:46 -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=I0FPSNRo; 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 S1377648AbiFVSxa (ORCPT + 99 others); Wed, 22 Jun 2022 14:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377455AbiFVSxY (ORCPT ); Wed, 22 Jun 2022 14:53:24 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415C514D0D; Wed, 22 Jun 2022 11:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655924004; x=1687460004; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HyqXe3YpcG69L/CqKIXcDkqKitmqxyYJrgqY1yf4XoQ=; b=I0FPSNRoVqe/hgDm86MOJ7FuuIqpP12oKcAiRHav0R6M6UzcTNpkIs/8 3Grs5MXk/4ET2CEKzxHgnLlZnspzqhkDFz42SXVnmo+BcDyahGygwt0WZ yFxlKkvyheXm13+BTzvN6EGGOpsAGYnKMWFnI29+m6Ym6yHYAOElD5D74 jO0e8NNVLQESTkN5JA4gd/Uqm32eSSpqy2/LMlHqtA8ry02fd0CfGVc+G qPKZh8TJuprGjzzIpjFvMd5hOYQepVxhX4v37kIg0ZsA9q4w/opYiR5pz PPUb8s+TqZZ1gWUs68Vj8UKqTovIe6Z0K9cp1ifgXCEpTta6CE05Yt0Sa Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="305971537" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="305971537" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 11:53:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="538592412" Received: from bwalker-desk.ch.intel.com ([143.182.136.162]) by orsmga003.jf.intel.com with ESMTP; 22 Jun 2022 11:53:23 -0700 From: Ben Walker To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 02/15] dmaengine: Move dma_set_tx_state to the provider API header Date: Wed, 22 Jun 2022 11:53:13 -0700 Message-Id: <20220622185313.3043550-1-benjamin.walker@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 --- 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 ea6ec2666eb15..f968f7671e22c 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1464,17 +1464,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.35.1