Hi Shimoda-san, On Wed, Aug 28, 2019 at 1:15 PM Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > This patch adds dma-channel-mask property support not to reserve > some DMA channels for some reasons. (for example: a heterogeneous > CPU uses it.) Thanks for your patch! > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> One suggestion below. > --- a/drivers/dma/sh/rcar-dmac.c > +++ b/drivers/dma/sh/rcar-dmac.c > @@ -1806,7 +1806,17 @@ static int rcar_dmac_parse_of(struct device *dev, struct rcar_dmac *dmac) > return -EINVAL; > } > > - dmac->channels_mask = GENMASK(dmac->n_channels - 1, 0); > + /* > + * If the driver is unable to read dma-channel-mask property, > + * the driver assumes that it can use all channels. > + */ > + ret = of_property_read_u32(np, "dma-channel-mask", > + &dmac->channels_mask); > + if (ret < 0) > + dmac->channels_mask = GENMASK(dmac->n_channels - 1, 0); You could keep the preinitialization, and just ignore the return value: dmac->channels_mask = GENMASK(dmac->n_channels - 1, 0); of_property_read_u32(np, "dma-channel-mask", &dmac->channels_mask); > > + > + /* If the property has out-of-channel mask, this driver clears it */ > + dmac->channels_mask &= GENMASK(dmac->n_channels - 1, 0); > > return 0; > } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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