Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp627057pxb; Thu, 21 Apr 2022 07:08:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymvuGm8u6dSFQvy+v+FUbsxitkCNB4Pj9iNChbNJK1XX2mlbbcXOiudxrumVOb04cuE7Lj X-Received: by 2002:a17:90b:4b0e:b0:1d2:c23b:553f with SMTP id lx14-20020a17090b4b0e00b001d2c23b553fmr10753144pjb.160.1650550136036; Thu, 21 Apr 2022 07:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650550136; cv=none; d=google.com; s=arc-20160816; b=sAH9GOSICuYLldFHuLyBeQoKxrxbtBhMVRPeBupLrX0ukB9TNyJO/TEeedlk0VmPyR pP0qYzFSNn8sBzZA2dx9DA6t2G594XvwmYdEbLt9qEkF5Ere7byeKaZ6HNPrXfen7KLa cXn4McCZloUht+n5f3DQchgZWjKoh35akAzQF1eWKx+GV8sRERYHlHP1ApdNyGJidaKl GjjPOyDFmjLDMGgTriZmHR3S3qGPTeY5MPxNCpAZ30CB7OIflBk9t4x6Dbm4DA2hu0VP CTM11C+b0p2qoocKCejiDP9FAciS1LabKEkEnl2WPkh3AMF9RRI1qDIIB5kgET930ksN /Xbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jacEgw87rloXHxeOHqCJljWhi+9D5RgsPzST4uvZ/js=; b=b+IGR19CPNNVms0IsLTwPDndsfH23w2WA7M4S+xtJ+kQsNWnepkQXvw3/CpYxRiMwT Dl8CnoN1xbSs55vuUlZZPpF2uWPzUKg1/Ttq95DkGu7sXzu9Qbmk4Ayzqbkz0V6rKtyz pgo3Z9PsY1/Yvy00BELIEjYmBXgYkYatAbemvBNrOLKddme0FAh85xO/c6v/MO3UB0wt q9ARjqDrHNfOsMqI9QjN15vSuWgzp2R7CzT5h53uzkU2WpoCrbiE1a796BVcXtb3TqoR ohrGqwE5fnIAUhjmlie72gDhW4r3FI39wd/s8YeuxAHcPo2zCxfUuVRbqCb0RrxzPkAo G5MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EH2GkKif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a632c05000000b003a2c77e0d4asi5455948pgs.23.2022.04.21.07.08.38; Thu, 21 Apr 2022 07:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EH2GkKif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240741AbiDTMnX (ORCPT + 99 others); Wed, 20 Apr 2022 08:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378728AbiDTMnH (ORCPT ); Wed, 20 Apr 2022 08:43:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF6D14013; Wed, 20 Apr 2022 05:40:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BD9EE6197E; Wed, 20 Apr 2022 12:40:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F5F1C385A0; Wed, 20 Apr 2022 12:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650458421; bh=XbbsN13otZbTzcITveCVrOxBJa3FapvrEzy91rjQNTQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EH2GkKifMitUEqaiV1rvoHFuHtGkCZB1bDG2etxeVBDc0lEDQlxRynu9lkkNCbUPM cGou1blo8GSRWOrp4yOcvrLZ4iPO8rXGMx+81QKhkQlB+6iVDil0YxM8IyCsda3J8L uTN7Byobs+HOcQSJIkQbkbnpRj6MAk8U8le+DNPnXqh6XtAR8o/kSqOUyPEHIKvTK3 sBKsgTL+Ytk5Eow0mfN8xJ7l6UhdGDgcllDwCOYbmLX4IiYVWr0PQ3EHmOmoahLfxv 2bYrHEwTbSPYwLDea3IRSKcwEbD4r/PRPY7tW2wrOt02jZBeKBfBBmq2zJG/DJDsMr v3XbkcUJsxzMQ== Date: Wed, 20 Apr 2022 18:10:16 +0530 From: Vinod Koul To: Martin =?utf-8?Q?Povi=C5=A1er?= Cc: Hector Martin , Sven Peter , Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis Subject: Re: [PATCH v2 2/2] dmaengine: apple-admac: Add Apple ADMAC driver Message-ID: References: <20220411222204.96860-1-povik+lin@cutebit.org> <20220411222204.96860-3-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220411222204.96860-3-povik+lin@cutebit.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-04-22, 00:22, Martin PoviĊĦer wrote: > +struct admac_chan { > + int no; Unsigned int perhaps? > +static int admac_desc_free(struct dma_async_tx_descriptor *tx) > +{ > + struct admac_tx *adtx = to_admac_tx(tx); > + > + devm_kfree(to_admac_chan(tx->chan)->host->dev, adtx); Why use devm for descriptor memory? > +static int admac_device_config(struct dma_chan *chan, > + struct dma_slave_config *config) > +{ > + struct admac_chan *adchan = to_admac_chan(chan); > + struct admac_data *ad = adchan->host; > + bool is_tx = admac_chan_direction(adchan->no) == DMA_MEM_TO_DEV; so are the channel directions hard wired in hardware? -- ~Vinod