[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdV5Dw2FZcp6K7Kytzxtp7apEQ0FuE1CiOi+R4QVDrhM3A@mail.gmail.com>
Date: Fri, 27 Sep 2019 11:15:58 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Rob Herring <robh@...nel.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-pci <linux-pci@...r.kernel.org>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Robin Murphy <robin.murphy@....com>,
Florian Fainelli <f.fainelli@...il.com>,
Stefan Wahren <wahrenst@....net>,
Frank Rowand <frowand.list@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Marek Vasut <marek.vasut@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Simon Horman <horms+renesas@...ge.net.au>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Oza Pawandeep <oza.oza@...adcom.com>
Subject: Re: [PATCH 03/11] of: address: Report of_dma_get_range() errors meaningfully
On Fri, Sep 27, 2019 at 2:25 AM Rob Herring <robh@...nel.org> wrote:
> From: Robin Murphy <robin.murphy@....com>
>
> If we failed to translate a DMA address, at least show the offending
> address rather than the uninitialised contents of the destination
> argument.
>
> Signed-off-by: Robin Murphy <robin.murphy@....com>
> Signed-off-by: Rob Herring <robh@...nel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> drivers/of/address.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index 8e354d12fb04..53d2656c2269 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -955,8 +955,8 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
> dmaaddr = of_read_number(ranges, naddr);
> *paddr = of_translate_dma_address(np, ranges);
> if (*paddr == OF_BAD_ADDR) {
> - pr_err("translation of DMA address(%pad) to CPU address failed node(%pOF)\n",
Yeah, the %pad was wrong on 32-bit without CONFIG_PHYS_ADDR_T_64BIT.
> - dma_addr, np);
> + pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n",
> + dmaaddr, np);
> ret = -EINVAL;
> goto out;
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists