Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Wed, 27 Jan 2021 08:58:08 +0100 | Subject | Re: [PATCH v2 2/4] dmaengine: rcar-dmac: Add for_each_rcar_dmac_chan() helper |
| |
Hi Laurent,
On Tue, Jan 26, 2021 at 10:55 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Mon, Jan 25, 2021 at 03:24:29PM +0100, Geert Uytterhoeven wrote: > > Add and helper macro for iterating over all DMAC channels, taking into > > s/and helper/a helper/
Oops.
> > 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,10 @@ struct rcar_dmac { > > > > #define to_rcar_dmac(d) container_of(d, struct rcar_dmac, engine) > > > > +#define for_each_rcar_dmac_chan(i, chan, dmac) \ > > I would have placed the iterator (chan) after the container being > iterated (dmac), but it seems there are some for_each_* macros doing it > the other way around (they may be older though).
Makes sense.
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Thanks!
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
| |