Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3036995pxb; Tue, 12 Jan 2021 04:58:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoMoWs4V2jFQbDpTESRQUuZJZxwU+3d1nU2KF74WGEO7U/FB1wgvCFxTp3VdvzRMZOl3K3 X-Received: by 2002:a17:906:7804:: with SMTP id u4mr3193725ejm.97.1610456338222; Tue, 12 Jan 2021 04:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456338; cv=none; d=google.com; s=arc-20160816; b=0+m8jcG/pKsHwyD3ouso5yHUfR8grO2URn2HM7DeJ3H9jEkOhxMzrMlM6VbEcKIpbc qf2b4IgCGP9h09er+NOZTrAfrpWGe7uZ1fD2bwmMMnrQZJ05MNIzu5MP2LvlW6tMy/mZ WtKsSdXwOHb9xItAFWkvBCcPRYxzIhKK/mC+NHB/omKzzPaN89lJ2mfVg8mNB2kufXaB Tqu0dq00uU02eQI5URDd5toApXvmMoTcbjigeWV4PuP9z8CdAb1NsVeILsVFFmfZ6yGr rVs7kLoFhWuxUgBnxZZjqwRMb8ztLk12D3T42AzRLvpOYuyzuxcdAb7Y5zGhzfl98qKl CBCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=pNy54YvyEG+MmyMNSknqMIs/iaqY7Dt1qSoRryJi0OY=; b=ma2uRjKUZstCV010CUwjYHK30w5Lz0s0FbQprMwYZbY9HODUy0U2mTVmE+VtSrEVXV Owo3d2eGYCDUy/VghHfHdjcCrLMf6zPxfrmpLIPmgXKY2tT90gr32zlxNztmRSSCVZTd 8hn54YySvQgN9mi97NFRw3YeQfFY46Hj9IOv3dS3a/Sv1G+5qXMz+7NhBHMYOeB7LA9e Ss6lLBpVHgF7QvlhCYPVFcSMW4khwRtJA21auSsn4rgpGGKdlPXfI0+dms3iQjkhH3u3 7V/Y0LDsQ+0XZuI5ElqfnJ/HWywamFAZZClslZbqCuQy1NWaS8sTdAqCGtTG4J2vUM03 ZXMA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si1098704ejx.368.2021.01.12.04.58.34; Tue, 12 Jan 2021 04:58:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392930AbhALK1I (ORCPT + 99 others); Tue, 12 Jan 2021 05:27:08 -0500 Received: from mail-oi1-f173.google.com ([209.85.167.173]:34068 "EHLO mail-oi1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbhALK1I (ORCPT ); Tue, 12 Jan 2021 05:27:08 -0500 Received: by mail-oi1-f173.google.com with SMTP id s75so1849107oih.1; Tue, 12 Jan 2021 02:26:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pNy54YvyEG+MmyMNSknqMIs/iaqY7Dt1qSoRryJi0OY=; b=dYwfr/bLujGXNXs3qghhT/QW7ozFPQttyuD5yQExNqMYaDdrDOwGRXdzHPiOUWRZp0 OM21c4+p8Icly9q9APT2IzJ3Icbj/rdk1zJyBzcdeXWxXrSK/e1HLUXSRsiIb9mw3bRT RfRMrbN2i7gYHYSE0QZjAxaI2l4o8u1P158iIj0b8aZ5+TfPUJRJO/VgAJPgtdEfIpTp A+MTU7nNYLhA7knGofaYiSk0IbKMK6H9zccYc7oygCJxW6HrkQzjCu2EndhCzMS/bZAL kXqXtKRyCfY4vHRmoAOnmhkaD0UOFNoTw1euxFrZ3XhtPc5V8AAPjSMr3l0WVH8aPG5u 9iqA== X-Gm-Message-State: AOAM53315c82KgvhR4KgsOASsJ1g2TVP6j3POei9m014gREL7I1QleGC mbpcGFi7TKx+Wl/sRLkMe2JHMOT6Z59TYl2lcadi2g8xQaU= X-Received: by 2002:aca:4b16:: with SMTP id y22mr1881850oia.148.1610447187714; Tue, 12 Jan 2021 02:26:27 -0800 (PST) MIME-Version: 1.0 References: <20210107181524.1947173-1-geert+renesas@glider.be> <20210107181524.1947173-3-geert+renesas@glider.be> <20210112101950.GK2771@vkoul-mobl> In-Reply-To: <20210112101950.GK2771@vkoul-mobl> From: Geert Uytterhoeven Date: Tue, 12 Jan 2021 11:26:16 +0100 Message-ID: Subject: Re: [PATCH 2/4] dmaengine: rcar-dmac: Add for_each_rcar_dmac_chan() helper To: Vinod Koul Cc: Rob Herring , Dan Williams , Yoshihiro Shimoda , Phong Hoang , dmaengine , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? BTW, the new punched cards are 96-column wide, not 100-column ;-) https://en.wikipedia.org/wiki/Punched_card#IBM_96-column_format Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds