[PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA engine

Amit Tomer amittomer25 at gmail.com
Mon Jun 29 04:19:13 EDT 2020


Hi Vinod,

Thanks for having a look and providing the comments.

> Is the .compatible documented, Documentation patch should come before
> the driver use patch in a series

Yes, this new compatible string is documented in patch (05/10).
I would make it as a patch (1/10).

> >  static int owl_dma_probe(struct platform_device *pdev)
> >  {
> >       struct device_node *np = pdev->dev.of_node;
> >       struct owl_dma *od;
> >       int ret, i, nr_channels, nr_requests;
> > +     const struct of_device_id *of_id =
> > +                             of_match_device(owl_dma_match, &pdev->dev);
>
> You care about driver_data rather than of_id, so using
> of_device_get_match_data() would be better..

Okay. would take care of it in next version.

> >       od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL);
> >       if (!od)
> > @@ -1083,6 +1116,8 @@ static int owl_dma_probe(struct platform_device *pdev)
> >       dev_info(&pdev->dev, "dma-channels %d, dma-requests %d\n",
> >                nr_channels, nr_requests);
> >
> > +     od->devid = (enum owl_dma_id)(uintptr_t)of_id->data;
>
> Funny casts, I dont think you need uintptr_t!

But without this cast, clang compiler emits following warning:

warning: cast to smaller integer type 'enum owl_dma_id' from 'const void *'
          [-Wvoid-pointer-to-enum-cast]

Thanks
-Amit



More information about the linux-arm-kernel mailing list