From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24DDFC433E0 for ; Tue, 12 Jan 2021 10:39:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1B9223105 for ; Tue, 12 Jan 2021 10:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726402AbhALKjT (ORCPT ); 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: dmaengine@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