From patchwork Wed Dec 15 11:01:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12696253 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 1FAFEC433EF for ; Wed, 15 Dec 2021 11:08:42 +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=EjrV43gfyNV4z4eWFN5ID8/Cdz7Uzh8sTrdUB9Vpu1Y=; b=bz6fJwdaAWol74 Mg3v7LdtdECHAZ0dFZONbZW11HApPPveZ5rE1wkHt4YMKcYYYV71Uu5krm4n2DwrIU7sw0egKcyGb i7pPsG5sWlVq96HBKn86TKYoCSVLbZxf176UR1FJ2yrBI9U3sgdp69Rb80vd/uUtEsIzuv2qjnjkX MvHXhPqaR6kWnmJWg0SMzGhcpMlPfWKldHEbLpy44EHqZPHMrTjcIq4qsTcJCOhnUemQBTTueJIG5 /MmTmkpYdAldfnSSIs7eBt6KSsV1lQitlzDga6wQSO5rh52e24+WFrIYXaojBmqvCl+yPQAuqyxVU VeGSz8XCHtv6F1Zi9FrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxS7i-000P4t-Fn; Wed, 15 Dec 2021 11:07:03 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxS2P-000MDb-GZ for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 11:01:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639566093; x=1671102093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3k8a8xCqtq8m/zip3YHJv9qzx7jb4XAorSSZVUzxzPw=; b=mvU3ASKs/VJh/+4I8obhWaTCuxSt2xeuUUSViCXiCpRHBT9ZQUBQdFjl LDg5WHZTlS2zp9idFlbnEmL46e3x41AMDC4eo+Rs7MZ5lHwPj5igirK+0 t1wouOJlltZ1iBB2dVptE+srQjjhK+jQIlNgrmBMM8LCMrq4OdG01U2us pU6rZe1aFkq+8qaQhMeuvUXi2muOgtpuwp3BdKYd5lkwbCSeNCLScVRdU PLpC+JdPWwkbp3gPis/lbcvOvIPwLrU9FM1FJfo9LdaZbwi8dPTKEX51X RolqBffAwaMLtBHpTD3n2bAU8JfrSLEcMDUcytPHWQl8Z56NxxSYIR2nw g==; IronPort-SDR: mxQk44P8fKjrH3MGpoj26/z9Z2F54hSlvCknTspKuGZHLO+FyWmY03WQO2//StEO8Z8PLpUJMN oN6qDgp4/rK+y+FyapAvme9GE7wy7fYftuR9bDUDcvyek0kBHqPd8YrlAB90GPtvBNQnVSaugl QW9D+NAQ5KEN7OmS0CRChgXR5GwXD3GJx5JI/oB5+I6YyW2Ga6Ug9PJ2lHguYTpQfBqvux7ir1 Upf6welnS4wf7dgAguKrg+BACWAC7nPfashZjC6XNBBgllEw5zl2y+T8AfIHPfnX/iLlXWMrXm l3QzkxkjucUm81gX4/1t6wB1 X-IronPort-AV: E=Sophos;i="5.88,207,1635231600"; d="scan'208";a="142483354" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Dec 2021 04:01:28 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Wed, 15 Dec 2021 04:01:27 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Wed, 15 Dec 2021 04:01:25 -0700 From: Tudor Ambarus To: Subject: [PATCH v3 03/12] dmaengine: at_xdmac: Print debug message after realeasing the lock Date: Wed, 15 Dec 2021 13:01:06 +0200 Message-ID: <20211215110115.191749-4-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215110115.191749-1-tudor.ambarus@microchip.com> References: <20211215110115.191749-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-20211215_030133_669204_F128A87F X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. 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 , mripard@kernel.org, linux-kernel@vger.kernel.org, ludovic.desroches@microchip.com, dmaengine@vger.kernel.org, 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 It is desirable to do the prints without the lock held if possible, so move the print after the lock is released. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Tudor Ambarus --- drivers/dma/at_xdmac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index c3d3e1270236..7d3560acedbb 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -473,10 +473,12 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx) spin_lock_irqsave(&atchan->lock, irqflags); cookie = dma_cookie_assign(tx); - dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n", - __func__, atchan, desc); list_add_tail(&desc->xfer_node, &atchan->xfers_list); spin_unlock_irqrestore(&atchan->lock, irqflags); + + dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n", + __func__, atchan, desc); + return cookie; }