From patchwork Tue Nov 16 11:20:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12692747 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97300C4332F for ; Tue, 16 Nov 2021 11:29:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6C2C961360 for ; Tue, 16 Nov 2021 11:29:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6C2C961360 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=2cAtSn1eZPV3OW I3XfumXJKL8+eJWxO6uTdic6lutrpF3lAWNjrdFJXDyWQr47hjKtUOGi8e0XukYD91mcN1YSKKMbP I0KNqm8hZ1plZhb6Ojez3UDh6VdI89oGFyBWKnmGwKcVVDhy7iY1T09wcMQkZqsIWf7ho9h2h+R1W p6Cj23JAs6NgxGnxQ9TQl6kpwxZv3TtiIDe/Ytj2TrsF8fkurU66GFjq+OTmROD7v7IdzuNpQIqwi raVSd6YpD05Tn8B82s4vW2NWg+38F27ORllBsEEjR2ytWC29OUqV0BJDoMYWh9qHOBPDNDvwwb4P0 XTD3USnv/3uF3GGydXUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmwcy-001QTh-4Y; Tue, 16 Nov 2021 11:27:52 +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 1mmwWe-001O8g-OT for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:21:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637061680; x=1668597680; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4UJToV8z1d1CSnT1DHee/do0TBGgvnsbC5y36KVHVoA=; b=urZ97rEwv9SBHx0q129gM0z7r8KDnUW7nQ3/bkkmkMeHg7kraVTPJ6Jc rjG0EeXkgyggtzbz25L15JmOilGPDZA9urZD3rJfhdYEVwOSx2f3RpCB0 UXx9Hdqf8MCMhbyIk3LcqTM3/gRnUS05rKpiMaxzxP5m4YbphgCNb6pwe MeXv11DfW3SepD3eQf911WclhGbCgeKQTvnMe4VOWans71x7FQwBERRPi FbvflpzkNOg5zdZJKJNxhnV09jGTm/kj4f7muYeCHbnYQqlf4ksPKl+zk MQcIh/XupAB1cDpxXz3O36+SP3YJo8k5Lh7RhkfKEH1fFFCULRC/t1S4P w==; IronPort-SDR: brqGcVkMu6p19txpv00wUnn71TVfCG/Ak3bOmAroJqg/zfSScjECH7yB/aGDZOqn11UT/OC+/Y ZjM9fxrvI+xa1qDd65NyoMUrh6YWfWdMAmOdRX1cwD0HWmGyKTZ2z2srUmjGY6ny/Ev1i80htW f0Xl/cmjWuPozpNSyhYy2tnnp92N7d2fuU05mZWpsnE8QpKQToEoA3YjoJs2oBpnZjvOONrd6R 6lfSaoibxWsFaXg7ycpXfs5u5XuqtiEB+NFA/e9Ziq6KXqKNp4SXVIDpJ99PWH89R5D96hS4E5 QcnZftuxmykH0PAmGLSC8s0t X-IronPort-AV: E=Sophos;i="5.87,239,1631602800"; d="scan'208";a="152085416" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Nov 2021 04:21:19 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2176.14; Tue, 16 Nov 2021 04:21:18 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 16 Nov 2021 04:21:15 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH 10/13] dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_advance_work() Date: Tue, 16 Nov 2021 13:20:33 +0200 Message-ID: <20211116112036.96349-11-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211116112036.96349-1-tudor.ambarus@microchip.com> References: <20211116112036.96349-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-20211116_032120_881722_CB27C715 X-CRM114-Status: UNSURE ( 9.92 ) 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: 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)