Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2859682imu; Sun, 11 Nov 2018 02:30:38 -0800 (PST) X-Google-Smtp-Source: AJdET5cS8X/DU8MSPHZWONKQ78cYPp5rgaPR7ALYF9Vcu7fYgW51qtHh534KcXRXGFWNp6U0e968 X-Received: by 2002:aa7:8348:: with SMTP id z8-v6mr15777643pfm.81.1541932238683; Sun, 11 Nov 2018 02:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541932238; cv=none; d=google.com; s=arc-20160816; b=nLK3hwsJoUQZbRc98HDz2KC+Ruqs3NgmRXoTz678ovlwlzZ9fm6ofnWtN1amuZ0EYW 0lFWS14ilL/TzScE5lh0kdXtSj164zwrpnFbVpiQxk9G82mz4hnpz2Q72aIIxzxVKRf+ UgjN9EBc5VQc1ySw0NXjhc4D2X/Yd0GIh2FLXG0zDCkrQmDbVJT8wopDSPyg7rcAAr24 fHjIP2cbOz8v7RxEBPSer3pCgCfQF6sSCdTxPzl28umS6uFnlTCMf1Do84kn+60hlGMr 7UI4qwthZYbNmyhfCokzYMHJyG4AApfzCbqiR/FPed1K7DJeIS09BdDu81FeNRSDh5N0 4GWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ByedQUhDpDOQi76heJ8+KmLVGsRnXI2gLb7VOwhPl8g=; b=Ih85sPnV0XbRfsZElnLY+BmhdGdhpGJNKOQUAqIjseBu012Wim3bAvn5OJTgTlpR6i uB3htIdXNFhUQZHpHUg6GsJkSLR/RYHLymQxsfeeLlwKZHSRcLxW+8mBB85ytGaCWlb7 OUX8hhiy3C5sK/fGRJaSaRm4zJpPLnDD2eVhfgm1b7I747XMTdz9JYdibWp4j2yzAn6y 2KyJktFUlOFeqLDemXGbMoq3joVvW3KB0VTXzEL+hVGfuww9yz/ieyzGqNgeIXTkY4k4 fTCUz2NXUuqm5dMNNJqCG5c3IIDkuUIYGIVvFHKR6j7VbehhSAgSwMcPKDizr3h+cyLV L+1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1wcMipUy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si13592221pfi.222.2018.11.11.02.30.18; Sun, 11 Nov 2018 02:30:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1wcMipUy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727531AbeKKUSG (ORCPT + 99 others); Sun, 11 Nov 2018 15:18:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:49564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbeKKUSG (ORCPT ); Sun, 11 Nov 2018 15:18:06 -0500 Received: from localhost (unknown [171.76.98.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78B8E20871; Sun, 11 Nov 2018 10:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541932196; bh=NBqqCwMWjMquFKMMuJ+1hlXoR/ikR5TgaQ3cKo6yowg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1wcMipUy/EmrIMSiRuTWeGn/A1J2Ss5lzcFC3h9gPNR042c7OkB2AjndfHbLxLrGG eLBYyINsuTFr9pN/7QAiANttTkzGT0EmWPAhidX4Lo/Wn1Fj0KTVESp+kJ+HNhcg2+ NTc5ZB0G/MOM93JBwbihlD2x6xgM1a2gM3v2x+sI= Date: Sun, 11 Nov 2018 15:59:47 +0530 From: Vinod Koul To: Radhey Shyam Pandey Cc: dan.j.williams@intel.com, michal.simek@xilinx.com, appana.durga.rao@xilinx.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] dmaengine: xilinx_dma: Refactor axidma channel validation Message-ID: <20181111102947.GG12092@vkoul-mobl> References: <1538241480-13844-1-git-send-email-radhey.shyam.pandey@xilinx.com> <1538241480-13844-3-git-send-email-radhey.shyam.pandey@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538241480-13844-3-git-send-email-radhey.shyam.pandey@xilinx.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-09-18, 11:17, Radhey Shyam Pandey wrote: > In axidma start_transfer, prefer checking channel states before > other params i.e pending_list. No functional change. There needs to be proper reason rather than a preference, can you explain why > > Signed-off-by: Radhey Shyam Pandey > --- > Changes for v2: > Modified the commit message to mark it as non-functional change. > --- > drivers/dma/xilinx/xilinx_dma.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c > index 06d1632..a37871e 100644 > --- a/drivers/dma/xilinx/xilinx_dma.c > +++ b/drivers/dma/xilinx/xilinx_dma.c > @@ -1271,10 +1271,10 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan) > if (chan->err) > return; > > - if (list_empty(&chan->pending_list)) > + if (!chan->idle) > return; > > - if (!chan->idle) > + if (list_empty(&chan->pending_list)) > return; > > head_desc = list_first_entry(&chan->pending_list, > -- > 1.7.1 -- ~Vinod