From: peter.ujfalusi@ti•com (Peter Ujfalusi)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 10/14] dma: edma: Simplify direction configuration in edma_config_pset()
Date: Fri, 11 Apr 2014 09:39:10 +0300 [thread overview]
Message-ID: <53478E0E.8040709@ti.com> (raw)
In-Reply-To: <53471DC5.4090001@ti.com>
On 04/11/2014 01:40 AM, Joel Fernandes wrote:
> On 04/01/2014 08:06 AM, Peter Ujfalusi wrote:
>> We only support DEV_TO_MEM or MEM_TO_DEV directions with edma driver and the
>> check for the direction has been already done in the function calling
>> edma_config_pset().
>> The error reporting is redundant and also the "else if ()" can be removed.
>>
>
> NAK. Please don't do this. I have been working on MEM_TO_MEM support as
> well so leave it as it is for future.
Sure. It is still valid to say that the error else {} will never going to
happen since you have the same check in the calling function and they already
filtered the non implemented direction.
I'll leave this out from v3.
--
P?ter
>
> Thanks,
> -Joel
>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti•com>
>> ---
>> drivers/dma/edma.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
>> index 855766672aa9..d954099650ae 100644
>> --- a/drivers/dma/edma.c
>> +++ b/drivers/dma/edma.c
>> @@ -372,14 +372,12 @@ static int edma_config_pset(struct dma_chan *chan, struct edmacc_param *pset,
>> src_cidx = cidx;
>> dst_bidx = 0;
>> dst_cidx = 0;
>> - } else if (direction == DMA_DEV_TO_MEM) {
>> + } else {
>> + /* DMA_DEV_TO_MEM */
>> src_bidx = 0;
>> src_cidx = 0;
>> dst_bidx = acnt;
>> dst_cidx = cidx;
>> - } else {
>> - dev_err(dev, "%s: direction not implemented yet\n", __func__);
>> - return -EINVAL;
>> }
>>
>> pset->opt = EDMA_TCC(EDMA_CHAN_SLOT(echan->ch_num));
>>
>
next prev parent reply other threads:[~2014-04-11 6:39 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 13:06 [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 01/14] platform_data: edma: Be precise with the paRAM struct Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 02/14] dma: edma: Correct the handling of src/dst_maxburst == 0 Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 03/14] dma: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-04-11 16:43 ` Vinod Koul
2014-04-11 20:51 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 04/14] dma: edma: Set DMA_CYCLIC capability flag Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 05/14] arm: common: edma: Select event queue 1 as default when booted with DT Peter Ujfalusi
2014-04-10 16:23 ` Joel Fernandes
2014-04-11 8:17 ` Sekhar Nori
2014-04-11 8:50 ` Peter Ujfalusi
2014-04-11 8:56 ` Sekhar Nori
2014-04-11 9:38 ` Peter Ujfalusi
2014-04-11 9:42 ` Vinod Koul
2014-04-11 10:19 ` Sekhar Nori
2014-04-11 11:32 ` Peter Ujfalusi
2014-04-11 11:31 ` Vinod Koul
2014-04-11 12:23 ` Peter Ujfalusi
2014-04-11 12:46 ` Vinod Koul
2014-04-14 11:56 ` Peter Ujfalusi
2014-04-14 12:12 ` Sekhar Nori
2014-04-14 12:41 ` Peter Ujfalusi
2014-04-14 14:32 ` Sekhar Nori
2014-04-16 12:59 ` Peter Ujfalusi
2014-04-16 16:05 ` Joel Fernandes
2014-04-24 9:07 ` Peter Ujfalusi
2014-04-11 20:16 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 06/14] arm: common: edma: Save the number of event queues/TCs Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel Peter Ujfalusi
2014-04-11 8:43 ` Sekhar Nori
2014-04-01 13:06 ` [PATCH v2 08/14] DMA: edma: Use different eventq for cyclic channels Peter Ujfalusi
2014-04-10 16:36 ` Joel Fernandes
2014-04-11 16:47 ` Vinod Koul
2014-04-11 20:56 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 09/14] dma: edma: Implement device_slave_caps callback Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 10/14] dma: edma: Simplify direction configuration in edma_config_pset() Peter Ujfalusi
2014-04-10 22:40 ` Joel Fernandes
2014-04-11 6:39 ` Peter Ujfalusi [this message]
2014-04-11 19:57 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 11/14] dma: edma: Reduce debug print verbosity for non verbose debugging Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 12/14] dma: edma: Prefix debug prints where the text were identical in prep callbacks Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 13/14] dma: edma: Add channel number to debug prints Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 14/14] dma: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-04-10 22:52 ` [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation Joel Fernandes
2014-04-11 16:52 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53478E0E.8040709@ti.com \
--to=peter.ujfalusi@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox