linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Rob Herring <robh+dt@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Mark Brown <broonie@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	MTD Maling List <linux-mtd@lists.infradead.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Prabhakar <prabhakar.csengg@gmail.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Chris Brandt <Chris.Brandt@renesas.com>
Subject: Re: [PATCH v2 5/7] memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails
Date: Wed, 27 Oct 2021 09:17:39 +0200	[thread overview]
Message-ID: <CAMuHMdUjsVRwB0_TH5HD8CrPsM15K1RLatP_ABODMe2bQ4C2ow@mail.gmail.com> (raw)
In-Reply-To: <20211025205631.21151-6-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Prabhakar,

CC seebe

On Mon, Oct 25, 2021 at 10:57 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> Make sure we return error in case devm_ioremap_resource() fails for dirmap
> resource.
>
> Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/drivers/memory/renesas-rpc-if.c
> +++ b/drivers/memory/renesas-rpc-if.c
> @@ -243,7 +243,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
>         res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
>         rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
>         if (IS_ERR(rpc->dirmap))
> -               rpc->dirmap = NULL;
> +               return PTR_ERR(rpc->dirmap);

IIRC, it was intentional to make the dirmap optional (because the
device can be used without and/or because some variants on other SoCs
lack it?).  Unfortunately this is not reflected in the DT bindings
(yet?).  All code using the dirmap does check if rpc->dirmap is
valid first.

>         rpc->size = resource_size(res);
>
>         rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  reply	other threads:[~2021-10-27  7:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 20:56 [PATCH v2 0/7] Add SPI Multi I/O Bus Controller support for RZ/G2L Lad Prabhakar
2021-10-25 20:56 ` [PATCH v2 1/7] dt-bindings: memory: renesas,rpc-if: Add support for the R9A07G044 Lad Prabhakar
2021-11-16 10:31   ` (subset) " Krzysztof Kozlowski
2021-10-25 20:56 ` [PATCH v2 2/7] dt-bindings: memory: renesas,rpc-if: Add optional interrupts property Lad Prabhakar
2021-11-16 10:31   ` (subset) " Krzysztof Kozlowski
2021-10-25 20:56 ` [PATCH v2 3/7] spi: spi-rpc-if: Check return value of rpcif_sw_init() Lad Prabhakar
2021-10-25 20:56 ` [PATCH v2 4/7] mtd: hyperbus: rpc-if: " Lad Prabhakar
2021-10-25 20:56 ` [PATCH v2 5/7] memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails Lad Prabhakar
2021-10-27  7:17   ` Geert Uytterhoeven [this message]
2021-10-27  7:21     ` Geert Uytterhoeven
2021-11-16 10:31   ` (subset) " Krzysztof Kozlowski
2021-10-25 20:56 ` [PATCH v2 6/7] memory: renesas-rpc-if: Drop usage of RPCIF_DIRMAP_SIZE macro Lad Prabhakar
2021-10-27  7:22   ` Geert Uytterhoeven
2021-11-16 10:31   ` (subset) " Krzysztof Kozlowski
2021-10-25 20:56 ` [PATCH v2 7/7] memory: renesas-rpc-if: Add support for RZ/G2L Lad Prabhakar
2021-10-26 14:46   ` Krzysztof Kozlowski
2021-10-27 16:16     ` Lad, Prabhakar
2021-11-02 11:48   ` Wolfram Sang
2021-11-02 23:25     ` Lad, Prabhakar
2021-11-03  8:41       ` Wolfram Sang
2021-11-03  9:12         ` Lad, Prabhakar
2021-11-15 13:03   ` Wolfram Sang
2021-11-16 11:11   ` (subset) " Krzysztof Kozlowski
2021-10-26 14:48 ` [PATCH v2 0/7] Add SPI Multi I/O Bus Controller " Krzysztof Kozlowski
2021-10-26 19:07 ` (subset) " Mark Brown
2021-11-16 10:33 ` Krzysztof Kozlowski
2021-11-16 10:40   ` Lad, Prabhakar
2021-11-16 11:11     ` Krzysztof Kozlowski

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=CAMuHMdUjsVRwB0_TH5HD8CrPsM15K1RLatP_ABODMe2bQ4C2ow@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=Chris.Brandt@renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@gmail.com \
    --cc=vigneshr@ti.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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).