From patchwork Thu Nov 25 09:00:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12693615 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 DD2B0C433F5 for ; Thu, 25 Nov 2021 09:05:56 +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=Q4o5zMilcdgbs44Hx6dC/oiQwDOhxPzgg1LLSBLZazY=; b=tlJlK2CtacaK2r 8+90q4P+rfIqng3uh0X49Hq7ya6Sz2o/tLpPHYstU8pj10GdHHUa3nZH7oo9msbjxdcC63dUmac1J nsacOZzoKpOuJlaXIp5Br0Ywv8F93ptDvlaYtzOqizaQx/EGCrZVWzPtrxl5zfzAcWlxQrwRm688o GMOE6CVfPRu2BBBvYpysh/QEjYoNiG2N16X/m/sKZalV9baXl/FTRuwzCOKEFCPW+fxazRXpJhi3w 9nG4S7HKW2Y9ntQQgky7oWZou2dyl9YoWwMbsT/ZbV1rM7KGNj/jpchvWhn031uEvBprKS6oQ+uoC 0sFB6nkDra9j+DVfs9iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqAfz-006p5K-2v; Thu, 25 Nov 2021 09:04:19 +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 1mqAcv-006naI-BM for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 09:01:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637830869; x=1669366869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4UJToV8z1d1CSnT1DHee/do0TBGgvnsbC5y36KVHVoA=; b=HuCTD1BWrxLQkkjL5/JwOfEwA7qGVHnyQl6B/H3V76gfpaR/+GjsBAoJ QGnxTzmjB1Wg2ZnJI2iQ9NDbMWAh1KkCVRTKBtID74J+l8SasRkgJFMB7 ZE7i+RQsim2DlTGoyVr5DVZc26gRNLjAnXV63aLNXR2mRoo4bFPUzyxk+ XJ324K1MVUnSOUq27PbSlgYoytU5p0+cte9vzygsByVZscfANbap462Le XICVFsjpoVKYizZribiWF9l5HqWb62CQAJzugqRE0IxtaTevWnJt1cJ9B yFsZ1Q2P5IvBBZ1/PkW5uzwmplEsrliq+nuy5fftrJPzawdDbXSTSIDhH A==; IronPort-SDR: WtWwMmOjNZxfcvdh3RCLq++kbEcQo/nEclD5cbDkIS/rCBD81CYk07CWQWQnYDaeE7KAvwaogk mNEFVHTP5jgj2uVEJXtkdhgg8Cgn8NKv8uVPEuqsQQuFHknCi+DaVl6BB9OwMAKZ4rwwy+/4NX wqTNoln0JRUWkwOgmhymkTqfM8WHBCjZAZGtungScl7mzEXfIZMU7eACsYEdMURGJeLFDtEgpr 8m5k9/vnBZSPebapgEyRuocQns36LyoMI872X3LPs/i2Nzs+LuYLdUVIpW4vJOY3E1+RnyWNZu xHUUqFkH+5WG/kQH4HuCi11k X-IronPort-AV: E=Sophos;i="5.87,262,1631602800"; d="scan'208";a="77556153" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Nov 2021 02:01:08 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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.2176.14; Thu, 25 Nov 2021 02:01:06 -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.2176.14 via Frontend Transport; Thu, 25 Nov 2021 02:01:03 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH v2 10/13] dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_advance_work() Date: Thu, 25 Nov 2021 11:00:25 +0200 Message-ID: <20211125090028.786832-11-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211125090028.786832-1-tudor.ambarus@microchip.com> References: <20211125090028.786832-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-20211125_010109_484584_2BF3A0FB X-CRM114-Status: GOOD ( 10.21 ) 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: alexandre.belloni@bootlin.com, Tudor Ambarus , mripard@kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, 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's easier to read code with fewer levels of indentation. Signed-off-by: Tudor Ambarus --- drivers/dma/at_xdmac.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 81f6f1357dcb..89d0fc229d68 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1593,14 +1593,14 @@ static void at_xdmac_advance_work(struct at_xdmac_chan *atchan) * If channel is enabled, do nothing, advance_work will be triggered * after the interruption. */ - if (!at_xdmac_chan_is_enabled(atchan) && !list_empty(&atchan->xfers_list)) { - desc = list_first_entry(&atchan->xfers_list, - struct at_xdmac_desc, - xfer_node); - dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); - if (!desc->active_xfer) - at_xdmac_start_xfer(atchan, desc); - } + if (at_xdmac_chan_is_enabled(atchan) || list_empty(&atchan->xfers_list)) + return; + + desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc, + xfer_node); + dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); + if (!desc->active_xfer) + at_xdmac_start_xfer(atchan, desc); } static void at_xdmac_handle_cyclic(struct at_xdmac_chan *atchan)