Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3037807pxb; Tue, 12 Jan 2021 05:00:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZwGFTW5OA+Q0JB7MxigS91v1DewPcrG88S7ieH3LdX2C9HEpMlb/axU+N4M9P8+SsIwqk X-Received: by 2002:a17:906:d62:: with SMTP id s2mr3186747ejh.61.1610456414442; Tue, 12 Jan 2021 05:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456414; cv=none; d=google.com; s=arc-20160816; b=dnvMgDCFENLp2rIqL84EMO2B2f71+LDMtWGg3dSZ6vNBeAURDTP0gNXBDys8EcVHcQ fy4cMVyGp8iLNNGVfbt4rXfavVfPAGlnblBmV1487bNOiPYC95qeYlNkpLW5ifrWik55 WbOgDBZWDOYEjU2ApM6F4H5jRtFcUuRb1vJ3xmV+5RNne11afYBDVUHTEOLs7mxBl4DS aCH+FK8fMWr8TrKySuIakHRnJXy6BkpRfzB6wHWeoALpmaGTdImXtIlATa3Dfp/IoBGZ soc/+xkMdMvmCZ9CAddV06qyjYloCVFuv9Hl7aFhRNJ0TK791wc4RCxh17WcCHFm5c7f TTxA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3p2bHiKgBY1WbIsuxAdKrBQP03T3xTJGg57FCGBvhQ4=; b=VFlpE7Lf3h11QTDpVXpI2hOOdv69k6ffsqKOtO75VKa82ZHIjKGW52ghYz7u0LV2Ym HyazymDlUaNm2EdaDpVfgGUzHh9WD854vmGVWuwsxHrn59ZwkyjPUMpSe/wKGO6jsuUy hG47PVzzsc3lSqUfmVMuqKs3wZkUD0UJ+6+pi0CPeaXwUagfexM2FSfa8o5aUEDN71Vb vDxoOcYOjD9XVX2O8GSoD032BXfSjoGsPpXNXnuDO+DCV1WH/AIAxnyjhbkmROKGjBeH jQlCawBFwQn10f+Jvsfb9ecBsnrOvoL/7r0P8f71/S+P/RB8jS4e/X9TjHMafC8RmzZs 9dyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t/PJa3Gr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l19si1247147edq.537.2021.01.12.04.59.49; Tue, 12 Jan 2021 05:00:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t/PJa3Gr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726753AbhALKjT (ORCPT + 99 others); Tue, 12 Jan 2021 05:39:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:52080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbhALKjS (ORCPT ); Tue, 12 Jan 2021 05:39:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04A12222B3; Tue, 12 Jan 2021 10:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610447917; bh=ZGNvCDtW+GlWGGbFJul6XKQnVBKwD5l18BH8rBakqJI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t/PJa3GrpSSQ4j0/RyX+Cc1H0VbOY4cqgdb2hzJ779gmRTdX9XJMHs2gID3Wk2S5/ B8GRpfA3njaSmNrRm94tPgPLPygbGUASH4etLV/t2Hz4FGybdEKrpXPKrgi1yWzGQN YFzolHwXMsoQPwoQKlU81RS7ERyh+ISQ3F4+zU+cXVsC6n7xZTnB06e0/WqYI+M4lY mUWL3DmZRCBuE7Rsa7ApKdstK11bHBZj0+Qs4yb9NvUMtCUFGi3tCPdn6fIce2YEij ubT8H6T3+TXkQC8ttO/fn+9PBVG91taKJjunvwJARsZptGyZg8MuB2DXtT8AaGimo/ SZReH2mv/NvnQ== Date: Tue, 12 Jan 2021 16:08:31 +0530 From: Vinod Koul To: Geert Uytterhoeven Cc: Rob Herring , Dan Williams , Yoshihiro Shimoda , Phong Hoang , dmaengine , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Subject: Re: [PATCH 2/4] dmaengine: rcar-dmac: Add for_each_rcar_dmac_chan() helper Message-ID: <20210112103831.GM2771@vkoul-mobl> References: <20210107181524.1947173-1-geert+renesas@glider.be> <20210107181524.1947173-3-geert+renesas@glider.be> <20210112101950.GK2771@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-01-21, 11:26, Geert Uytterhoeven wrote: > Hi Vinod, > > On Tue, Jan 12, 2021 at 11:19 AM Vinod Koul wrote: > > On 07-01-21, 19:15, Geert Uytterhoeven wrote: > > > Add and helper macro for iterating over all DMAC channels, taking into > > > account the channel mask. Use it where appropriate, to simplify code. > > > > > > Restore "reverse Christmas tree" order of local variables while adding a > > > new variable. > > > > > > Signed-off-by: Geert Uytterhoeven > > > > --- a/drivers/dma/sh/rcar-dmac.c > > > +++ b/drivers/dma/sh/rcar-dmac.c > > > @@ -209,6 +209,11 @@ struct rcar_dmac { > > > > > > #define to_rcar_dmac(d) container_of(d, struct rcar_dmac, engine) > > > > > > +#define for_each_rcar_dmac_chan(i, chan, dmac) \ > > > + for (i = 0, chan = &(dmac)->channels[0]; i < (dmac)->n_channels; \ > > > + i++, chan++) \ > > > > single line to make it more readable? we have limit of 100 now :) > > Do we have to push the limits? In cases where it helps, I certainly recommend.. I feel in this case it makes a better read to have it in a single line.. > BTW, the new punched cards are 96-column wide, not 100-column ;-) > https://en.wikipedia.org/wiki/Punched_card#IBM_96-column_format Did we err in choosing 100 :D -- ~Vinod