From: Rob Herring <robh@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, 993612@bugs.debian.org,
Luca Di Stefano <luca.distefano@linaro.org>,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] of/address: Return an error when no valid dma-ranges are found
Date: Mon, 30 Jan 2023 15:43:19 -0600 [thread overview]
Message-ID: <167511499566.3580584.7454212476889148702.robh@kernel.org> (raw)
In-Reply-To: <20230126-synquacer-boot-v2-1-cb80fd23c4e2@kernel.org>
On Sat, 28 Jan 2023 17:47:50 +0000, Mark Brown wrote:
> Commit 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
> converted the parsing of dma-range properties to use code shared with the
> PCI range parser. The intent was to introduce no functional changes however
> in the case where we fail to translate the first resource instead of
> returning -EINVAL the new code we return 0. Restore the previous behaviour
> by returning an error if we find no valid ranges, the original code only
> handled the first range but subsequently support for parsing all supplied
> ranges was added.
>
> This avoids confusing code using the parsed ranges which doesn't expect to
> successfully parse ranges but have only a list terminator returned, this
> fixes breakage with so far as I can tell all DMA for on SoC devices on the
> Socionext Synquacer platform which has a firmware supplied DT. A bisect
> identified the original conversion as triggering the issues there.
>
> Fixes: 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Cc: Luca Di Stefano <luca.distefano@linaro.org>
> Cc: 993612@bugs.debian.org
> Cc: stable@kernel.org
> ---
> Changes in v2:
> - Don't leak parsed resources.
> - Link to v1: https://lore.kernel.org/r/20230126-synquacer-boot-v1-1-94ed0eb1011f@kernel.org
> ---
> drivers/of/address.c | 21 +++++++++++++++------
> 1 file changed, 15 insertions(+), 6 deletions(-)
>
Applied, thanks!
prev parent reply other threads:[~2023-01-30 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 17:47 [PATCH v2] of/address: Return an error when no valid dma-ranges are found Mark Brown
2023-01-30 21:43 ` Rob Herring [this message]
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=167511499566.3580584.7454212476889148702.robh@kernel.org \
--to=robh@kernel.org \
--cc=993612@bugs.debian.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.distefano@linaro.org \
--cc=robh+dt@kernel.org \
--cc=stable@kernel.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).