[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200629095207.GG2599@vkoul-mobl>
Date: Mon, 29 Jun 2020 15:22:07 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Amit Tomer <amittomer25@...il.com>
Cc: Andre Przywara <andre.przywara@....com>,
Andreas Färber <afaerber@...e.de>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
dan.j.williams@...el.com, cristian.ciocaltea@...il.com,
dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-actions@...ts.infradead.org
Subject: Re: [PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA
engine
On 29-06-20, 13:49, Amit Tomer wrote:
> 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]
If you use of_device_get_match_data() you will not fall into this :)
--
~Vinod
Powered by blists - more mailing lists