From: robert.jarzmik@free.fr (Robert Jarzmik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line
Date: Mon, 15 Feb 2016 18:24:57 +0100 [thread overview]
Message-ID: <87fuwt28eu.fsf@belgarion.home> (raw)
In-Reply-To: <20160215163524.GI19598@localhost> (Vinod Koul's message of "Mon, 15 Feb 2016 22:05:24 +0530")
Vinod Koul <vinod.koul@intel.com> writes:
> On Thu, Feb 11, 2016 at 10:23:18PM +0100, Robert Jarzmik wrote:
>> @@ -1399,13 +1405,17 @@ static int pxad_probe(struct platform_device *op)
>> return PTR_ERR(pdev->base);
>>
>> of_id = of_match_device(pxad_dt_ids, &op->dev);
>> - if (of_id)
>> + if (of_id) {
>> of_property_read_u32(op->dev.of_node, "#dma-channels",
>> &dma_channels);
>> - else if (pdata && pdata->dma_channels)
>> + of_property_read_u32(op->dev.of_node, "#requestors",
>> + &nb_requestors);
>
> I think we should check the return value here. This might be err in case
> when we have older DT on platform, but still should work with default in
> that case
Okay, but how should the code react to the err case, more specifically to
-EINVAL or -ENODATA ? As this property is optional as per the device-tree
description, the current code leaves nb_requestors = 0, as is specified in the
description, and fits the mmp_pdma case.
What do you think should be done ? A warning message ? Something else ?
Cheers.
--
Robert
next prev parent reply other threads:[~2016-02-15 17:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 21:23 [PATCH 0/4] Fix pxa dma requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 1/4] dma: mmp_pdma: Add the #requestors DT property documentation Robert Jarzmik
2016-02-11 21:59 ` Arnd Bergmann
2016-02-12 20:55 ` Robert Jarzmik
2016-02-11 21:23 ` [PATCH 2/4] dmaengine: mmp-pdma: add number of requestors Robert Jarzmik
2016-02-11 21:23 ` [PATCH 3/4] ARM: pxa: add the number of DMA requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line Robert Jarzmik
2016-02-15 16:35 ` Vinod Koul
2016-02-15 17:24 ` Robert Jarzmik [this message]
2016-02-15 17:33 ` Vinod Koul
2016-02-15 18:22 ` Robert Jarzmik
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=87fuwt28eu.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).