Thread (24 messages) 24 messages, 5 authors, 2020-06-30

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

From: Vinod Koul <vkoul@kernel.org>
Date: 2020-06-29 21:41:01
Also in: dmaengine, lkml

On 29-06-20, 13:49, Amit Tomer wrote:
Hi Vinod,

Thanks for having a look and providing the comments.
quoted
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).
quoted
quoted
 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.
quoted
quoted
      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]
If you use of_device_get_match_data() you will not fall into this :)

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help