Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbbGJGVu (ORCPT ); Fri, 10 Jul 2015 02:21:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:27208 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752942AbbGJGUU (ORCPT ); Fri, 10 Jul 2015 02:20:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,445,1432623600"; d="scan'208";a="603521199" Date: Fri, 10 Jul 2015 11:52:05 +0530 From: Vinod Koul To: Shengjiu Wang Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: imx-sdma: Add device to device support Message-ID: <20150710062205.GA836@localhost> References: <1435048974-23700-1-git-send-email-shengjiu.wang@freescale.com> <20150707042057.GH11002@localhost> <20150707052420.GA9703@shlinux2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150707052420.GA9703@shlinux2> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 35 On Tue, Jul 07, 2015 at 01:24:22PM +0800, Shengjiu Wang wrote: > > why not use set_bit(), you are modifying driver memory > Original driver all use the __set_bit. do you think we need to change > all the __set_bit to set_bit? And from the header file "arch/arm/include/asm > /bitops.h", the set_bit is same as __set_bit. New changes should be rightly done. __xxx denotes typically internal API to a subsystem, so if they are same I would suggest to use set_bit() > > > + /* > > > + * If LWML(src_maxburst) > HWML(dst_maxburst), we need > > > + * swap LWML and HWML of INFO(A.3.2.5.1), also need swap > > > + * r0(event_mask[1]) and r1(event_mask[0]). > > > + */ > > > + if (lwml > hwml) { > > > + sdmac->watermark_level &= ~0xff00ff; > > Magic number? ?? > > Okay the direction is depreciated, so can you store both source and > > destination and use them based on direction in prepare() > > > > Also I see driver is not doing this, so while at it, can you fix this is > > current code as well > > > which prepare() do you mean? sdma_prep_dma_cyclic, sdma_prep_slave_sg? both have direction as an argument. So you need to use that -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/