[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMz4ku+zPiucHyLF5HBtH9LhcTDUUec-kTLQG2YQ3hBK=9HHDw@mail.gmail.com>
Date: Wed, 18 Apr 2018 13:40:54 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Lars-Peter Clausen <lars@...afoo.de>
Cc: Dan Williams <dan.j.williams@...el.com>,
Vinod Koul <vinod.koul@...el.com>,
Eric Long <eric.long@...eadtrum.com>,
Mark Brown <broonie@...nel.org>, dmaengine@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] dmaengine: sprd: Add 'device_config' and
'device_prep_slave_sg' interfaces
On 17 April 2018 at 18:45, Lars-Peter Clausen <lars@...afoo.de> wrote:
> On 04/10/2018 09:46 AM, Baolin Wang wrote:
> [...]
>> +static int sprd_dma_slave_config(struct dma_chan *chan,
>> + struct dma_slave_config *config)
>> +{
>> + struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
>> + struct sprd_dma_config *slave_cfg =
>> + container_of(config, struct sprd_dma_config, config);
>> +
>
> Please do not overload standard API with custom semantics. This makes the
> driver incompatible to the API and negates the whole idea of having a common
> API. E.g. this will crash when somebody passes a normal dma_slave_config
> struct to this function.
>
Yes, we have discussed with Vinod how to use 'dma_slave_config' to
reach our requirements. Thanks for your comments.
--
Baolin.wang
Best Regards
Powered by blists - more mailing lists