From patchwork Sat Aug 20 12:57:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12949697 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DB5FC25B08 for ; Sat, 20 Aug 2022 13:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1sXlgkguh4vNQDb42KF9wesmemrdGpFmsLmKqWEqezg=; b=1HKNJE8EE+9682 7/bG1FkoXMdi2wbzj6PVdLoTDaH4lWwM4ANtmu+0gyhxCRDqFb9Fndt4bSiWyXmT672McZmcXXBij bIiSJzaNs7puu1BThoyHvYy0VMJgCS6OR58isggFOAOQBPF7RnoGGFWzZuM+eLrbYAMn4cEXoEn2i tuvEklW0doiM+UR0bbgoCHtss/g175lvhXD84kfR9DDDhXZMOCjIC4zVkn116HF0w7cgdD9Fsf007 X9NipFDcU8aqXHsCL4P9LCsekkJvs+ljBcFRtplSMhqhDewSY/x4LrHA0vwH1KRC5yhEn5iksHT8T bnO+nAVLM88zhoyKTCZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPOGm-00AJNi-0R; Sat, 20 Aug 2022 13:12:08 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPO3o-00ACqN-Cv for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2022 12:58:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661000324; x=1692536324; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0GY7OSxCkPIEHcqNFjBIA4X/HK0yiPvOyvY0nEo/IVA=; b=ZU4sehaEfvNAsJplWjLM8W6hwhKnIPemZcJ7WevahuH5qqpDWCk7Ckrc 7RD7wp0/ajYDAF7r9G4/UaAi2vmLE/hdw9M3k/XA+yVHoL/ORoo5/3i4U Ub+nKHtnnST2d6GY8eVaDN26fL81NDJsEwn0X7t/XMvGARmTPW6QR1r+9 EKDxFgmR+zzkCRoptxvQXgzWXBguF3mslJlnjL9Ezfv9WuCRRCm3e8I6z 1U0E3r+vRMXfChwSQOAY3aNR0WGKICOMOIAZ3pcRpReXohqxJBsCi7s4a Bup29xcRSP8bkMbFuPFwSZcx4HVb1f6KCTPdKuCN9THr/6LBb2XuEXLXl Q==; X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="187325772" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Aug 2022 05:58:43 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sat, 20 Aug 2022 05:58:42 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sat, 20 Aug 2022 05:58:39 -0700 From: Tudor Ambarus To: , , , Subject: [PATCH 23/33] dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue Date: Sat, 20 Aug 2022 15:57:07 +0300 Message-ID: <20220820125717.588722-24-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220820125717.588722-1-tudor.ambarus@microchip.com> References: <20220820125717.588722-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220820_055844_550282_801DE5DC X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tudor.ambarus@microchip.com, linux-kernel@vger.kernel.org, maciej.sosnowski@intel.com, mripard@kernel.org, torfl6749@gmail.com, ludovic.desroches@microchip.com, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use dmaengine terminology and rename the method to better indicate what it does: it gets the residue value which will be later on set with dma_set_residue(). Signed-off-by: Tudor Ambarus --- drivers/dma/at_hdmac.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index abb884a08bd4..daf2a3af25d4 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -743,15 +743,15 @@ static inline u32 atc_calc_bytes_left(u32 current_len, u32 ctrla) } /** - * atc_get_bytes_left - get the number of bytes residue for a cookie. + * atc_get_residue - get the number of bytes residue for a cookie. * The residue is passed by address and updated on success. * @chan: DMA channel * @cookie: transaction identifier to check status of * @residue: residue to be updated. * Return 0 on success, -errono otherwise. */ -static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie, - u32 *residue) +static int atc_get_residue(struct dma_chan *chan, dma_cookie_t cookie, + u32 *residue) { struct at_dma_chan *atchan = to_at_dma_chan(chan); struct at_desc *desc_first = atc_first_active(atchan); @@ -1913,10 +1913,7 @@ atc_tx_status(struct dma_chan *chan, return dma_status; spin_lock_irqsave(&atchan->lock, flags); - - /* Get number of bytes left in the active transactions */ - ret = atc_get_bytes_left(chan, cookie, &residue); - + ret = atc_get_residue(chan, cookie, &residue); spin_unlock_irqrestore(&atchan->lock, flags); if (unlikely(ret < 0)) {