mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Hari.PrasathGE@microchip.com>
To: <ruanjinjie@huawei.com>, <broonie@kernel.org>,
	<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<claudiu.beznea@tuxon.dev>, <linux-spi@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next 1/2] spi: atmel-quadspi: Fix uninitialized res
Date: Tue, 27 Aug 2024 06:01:46 +0000	[thread overview]
Message-ID: <ad454e33-9ea0-4b94-a97f-38fd868af247@microchip.com> (raw)
In-Reply-To: <20240826125913.3434305-2-ruanjinjie@huawei.com>

Hello,

On 8/26/24 6:29 PM, Jinjie Ruan wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The second platform_get_resource_byname() can not be replaced with
> devm_platform_ioremap_resource_byname(), because the intermediate "res"
> is used to assign for "aq->mmap_size".
> 

Yes indeed.

I see that the above commit is merged in the SPI git tree. With that,

Acked-by: Hari Prasath Gujulan Elango <hari.prasathge@microchip.com>

Regards,
Hari

> Fixes: 3ccea1dedef3 ("spi: atmel-quadspi: Simpify resource lookup")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>   drivers/spi/atmel-quadspi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
> index 2b5c72176711..56dd8dcb86cb 100644
> --- a/drivers/spi/atmel-quadspi.c
> +++ b/drivers/spi/atmel-quadspi.c
> @@ -608,7 +608,8 @@ static int atmel_qspi_probe(struct platform_device *pdev)
>          }
> 
>          /* Map the AHB memory */
> -       aq->mem = devm_platform_ioremap_resource_byname(pdev, "qspi_mmap");
> +       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_mmap");
> +       aq->mem = devm_ioremap_resource(&pdev->dev, res);
>          if (IS_ERR(aq->mem)) {
>                  dev_err(&pdev->dev, "missing AHB memory\n");
>                  return PTR_ERR(aq->mem);
> --
> 2.34.1
> 
> 

  reply	other threads:[~2024-08-27  6:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 12:59 [PATCH -next 0/2] " Jinjie Ruan
2024-08-26 12:59 ` [PATCH -next 1/2] " Jinjie Ruan
2024-08-27  6:01   ` Hari.PrasathGE [this message]
2024-08-26 12:59 ` [PATCH -next 2/2] spi: atmel-quadspi: Simplify with dev_err_probe() Jinjie Ruan
2024-08-30 13:26 ` [PATCH -next 0/2] spi: atmel-quadspi: Fix uninitialized res Mark Brown

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=ad454e33-9ea0-4b94-a97f-38fd868af247@microchip.com \
    --to=hari.prasathge@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=ruanjinjie@huawei.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

all inboxes | Powered by JetHome®