Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753772AbbDPWJo (ORCPT ); Thu, 16 Apr 2015 18:09:44 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:42048 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499AbbDPWJc (ORCPT ); Thu, 16 Apr 2015 18:09:32 -0400 Message-ID: <55303318.5080609@tronnes.org> Date: Fri, 17 Apr 2015 00:09:28 +0200 From: =?UTF-8?B?Tm9yYWxmIFRyw7hubmVz?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Stefan Wahren , dmaengine@vger.kernel.org, vinod.koul@intel.com CC: dan.j.williams@intel.com, jonathan@raspberrypi.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Subject: Re: [PATCH] dmaengine: bcm2835: Add slave dma support References: <1429091778-26350-1-git-send-email-noralf@tronnes.org> <552EB54A.3060404@lategoodbye.de> In-Reply-To: <552EB54A.3060404@lategoodbye.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1468 Lines: 58 Den 15.04.2015 21:00, skrev Stefan Wahren: > Hi Noralf, > > Am 15.04.2015 um 11:56 schrieb Noralf Trønnes: >> Add slave transfer capability to BCM2835 dmaengine driver. >> This patch is pulled from the bcm2708-dmaengine driver in the >> Raspberry Pi repo. The work was done by Gellert Weisz. >> >> Tested with the bcm2835-mmc driver from the same repo. > > why not with the upstream kernel? > See my answer to Alexander Stein. >> + unsigned int i, j, splitct, max_size; > > I think "split_cnt" would be better. > >> + es = BCM2835_DMA_DATA_TYPE_S32; > > Looks like "es" is never used. > >> + break; >> + default: > > A dev_err() might be useful here. > >> + d->frames += 1 + len / max_size; > > If it's correct this should be more intuitive: > > d->frames += len / max_size + 1; > >> + for_each_sg(sgl, sgent, sg_len, i) { >> + dma_addr_t addr = sg_dma_address(sgent); >> + unsigned int len = sg_dma_len(sgent); >> + >> + for (j = 0; j < len; j += max_size) { > > It should be possible to move declaration of "j" down here. > >> + if (sync_type != 0) > > if (sync_type) ? > Thanks for your comments Stefan, I'll make a new version of the patch. Noralf. -- 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/