dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Phong Hoang <phong.hoang.wz@renesas.com>,
	dmaengine <dmaengine@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] dmaengine: rcar-dmac: Add for_each_rcar_dmac_chan() helper
Date: Tue, 12 Jan 2021 16:08:31 +0530	[thread overview]
Message-ID: <20210112103831.GM2771@vkoul-mobl> (raw)
In-Reply-To: <CAMuHMdXhKpO4RLXVBzVezSnui3ZvgB5oX-n25Mcj7se0PaX78A@mail.gmail.com>

On 12-01-21, 11:26, Geert Uytterhoeven wrote:
> Hi Vinod,
> 
> On Tue, Jan 12, 2021 at 11:19 AM Vinod Koul <vkoul@kernel.org> 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 <geert+renesas@glider.be>
> 
> > > --- 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

  reply	other threads:[~2021-01-12 10:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 18:15 [PATCH 0/4] dmaengine: rcar-dmac: Add support for R-Car V3U Geert Uytterhoeven
2021-01-07 18:15 ` [PATCH 1/4] dt-bindings: renesas,rcar-dmac: Add r8a779a0 support Geert Uytterhoeven
2021-01-13  3:23   ` Rob Herring
2021-01-07 18:15 ` [PATCH 2/4] dmaengine: rcar-dmac: Add for_each_rcar_dmac_chan() helper Geert Uytterhoeven
2021-01-12 10:19   ` Vinod Koul
2021-01-12 10:26     ` Geert Uytterhoeven
2021-01-12 10:38       ` Vinod Koul [this message]
2021-01-12 10:48         ` Geert Uytterhoeven
2021-01-07 18:15 ` [PATCH 3/4] dmaengine: rcar-dmac: Add helpers for clearing DMA channel status Geert Uytterhoeven
2021-01-07 18:15 ` [PATCH 4/4] dmaengine: rcar-dmac: Add support for R-Car V3U Geert Uytterhoeven
2021-01-12 10:36   ` Vinod Koul
2021-01-12 15:54     ` Geert Uytterhoeven
2021-01-12 17:04       ` Vinod Koul
2021-01-25 14:20         ` Geert Uytterhoeven
2021-01-12 15:55 ` [PATCH 0/4] " Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112103831.GM2771@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phong.hoang.wz@renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).