Message ID | 20220820125717.588722-7-tudor.ambarus@microchip.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <dmaengine-owner@kernel.org> 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 AD7DEC32774 for <dmaengine@archiver.kernel.org>; Sat, 20 Aug 2022 12:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346514AbiHTM5t (ORCPT <rfc822;dmaengine@archiver.kernel.org>); Sat, 20 Aug 2022 08:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346501AbiHTM5o (ORCPT <rfc822;dmaengine@vger.kernel.org>); Sat, 20 Aug 2022 08:57:44 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A657330B; Sat, 20 Aug 2022 05:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661000264; x=1692536264; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dTTi1bl8hDEHuPm5ibXS4s2heL+9TD/juZdMY07cfKw=; b=0qX7dTbIyFp03v08m4Hl18LbczLZe9hZ9BihFIptzRds2L5TAAavulJx hwWGUIFhoDJbWHsKUtXvDBRLKpw3NP+twJPY4lEJub6cV8t8J7tX3U+bG OaFrUe/kLypu6qzmqzFQ1CrcJnYuXlyMAal0VqHuibyfp+Cm/qgg5if2n QUt+37FItzK5rlAaZpjaswi/rF1cK7iXH6Vh0RQDpdD53v8Lfe5xHYJHE GZSwbvknUWfMdbOWwXN/tlbXGsg4VOdU1joa+Xvq/tzr8Lk+vEK8DiPYh PGge0yIwY80MqhKRmWFHbaSq7bnGJVBy9dyZTjEyJS4GPPCSp38GwphE7 w==; X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="177042710" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Aug 2022 05:57:44 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) 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:57: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:57:39 -0700 From: Tudor Ambarus <tudor.ambarus@microchip.com> To: <vkoul@kernel.org>, <peda@axentia.se>, <du@axentia.se>, <regressions@leemhuis.info> CC: <ludovic.desroches@microchip.com>, <maciej.sosnowski@intel.com>, <tudor.ambarus@microchip.com>, <dan.j.williams@intel.com>, <nicolas.ferre@microchip.com>, <mripard@kernel.org>, <torfl6749@gmail.com>, <linux-kernel@vger.kernel.org>, <dmaengine@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [PATCH 06/33] dmaengine: at_hdmac: Return dma_cookie_status()'s ret code when txstate is NULL Date: Sat, 20 Aug 2022 15:56:50 +0300 Message-ID: <20220820125717.588722-7-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: <dmaengine.vger.kernel.org> X-Mailing-List: dmaengine@vger.kernel.org |
Series |
dmaengine: at_hdmac: Fix concurrency bugs and then convert to virt-dma
|
expand
|
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 085a990f8d5d..91e53a590d5f 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1947,14 +1947,8 @@ atc_tx_status(struct dma_chan *chan, int bytes = 0; ret = dma_cookie_status(chan, cookie, txstate); - if (ret == DMA_COMPLETE) + if (ret == DMA_COMPLETE || !txstate) return ret; - /* - * There's no point calculating the residue if there's - * no txstate to store the value. - */ - if (!txstate) - return DMA_ERROR; spin_lock_irqsave(&atchan->lock, flags);
txstate is an optional parameter used to get a struct with auxilary transfer status information. When not provided the call to device_tx_status() should return the status of the dma cookie. Return the status of dma cookie when the txstate optional parameter is not provided. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> --- drivers/dma/at_hdmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)