* [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
@ 2025-11-05 8:49 Chin-Ting Kuo
2025-11-05 8:52 ` Cédric Le Goater
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Chin-Ting Kuo @ 2025-11-05 8:49 UTC (permalink / raw)
To: joel, andrew, clg, broonie, linux-aspeed, openbmc, linux-spi,
linux-arm-kernel, linux-kernel
Cc: kernel test robot
The AHB IO memory for each chip select is mapped using
devm_ioremap(), so it should be unmapped using devm_iounmap()
to ensure proper device-managed resource cleanup.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510292356.JnTUBxCl-lkp@intel.com/
Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
---
drivers/spi/spi-aspeed-smc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c
index e8bd8fe6c4e7..179c47ffbfeb 100644
--- a/drivers/spi/spi-aspeed-smc.c
+++ b/drivers/spi/spi-aspeed-smc.c
@@ -396,7 +396,7 @@ static int aspeed_spi_set_window(struct aspeed_spi *aspi)
for (cs = 0; cs < aspi->data->max_cs; cs++) {
if (aspi->chips[cs].ahb_base) {
- iounmap(aspi->chips[cs].ahb_base);
+ devm_iounmap(dev, aspi->chips[cs].ahb_base);
aspi->chips[cs].ahb_base = NULL;
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-05 8:49 [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory Chin-Ting Kuo
@ 2025-11-05 8:52 ` Cédric Le Goater
2025-11-05 14:35 ` Paul Menzel
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Cédric Le Goater @ 2025-11-05 8:52 UTC (permalink / raw)
To: Chin-Ting Kuo, joel, andrew, broonie, linux-aspeed, openbmc,
linux-spi, linux-arm-kernel, linux-kernel
Cc: kernel test robot
On 11/5/25 09:49, Chin-Ting Kuo wrote:
> The AHB IO memory for each chip select is mapped using
> devm_ioremap(), so it should be unmapped using devm_iounmap()
> to ensure proper device-managed resource cleanup.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202510292356.JnTUBxCl-lkp@intel.com/
> Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
> ---
> drivers/spi/spi-aspeed-smc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c
> index e8bd8fe6c4e7..179c47ffbfeb 100644
> --- a/drivers/spi/spi-aspeed-smc.c
> +++ b/drivers/spi/spi-aspeed-smc.c
> @@ -396,7 +396,7 @@ static int aspeed_spi_set_window(struct aspeed_spi *aspi)
>
> for (cs = 0; cs < aspi->data->max_cs; cs++) {
> if (aspi->chips[cs].ahb_base) {
> - iounmap(aspi->chips[cs].ahb_base);
> + devm_iounmap(dev, aspi->chips[cs].ahb_base);
> aspi->chips[cs].ahb_base = NULL;
> }
> }
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-05 8:49 [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory Chin-Ting Kuo
2025-11-05 8:52 ` Cédric Le Goater
@ 2025-11-05 14:35 ` Paul Menzel
2025-11-05 17:44 ` Markus Elfring
2025-11-06 11:34 ` Mark Brown
3 siblings, 0 replies; 8+ messages in thread
From: Paul Menzel @ 2025-11-05 14:35 UTC (permalink / raw)
To: Chin-Ting Kuo
Cc: joel, andrew, clg, broonie, linux-aspeed, openbmc, linux-spi,
linux-arm-kernel, linux-kernel, lkp
Dear Chin-Ting,
Thank you for your patch.
Am 05.11.25 um 09:49 schrieb Chin-Ting Kuo:
> The AHB IO memory for each chip select is mapped using
> devm_ioremap(), so it should be unmapped using devm_iounmap()
> to ensure proper device-managed resource cleanup.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202510292356.JnTUBxCl-lkp@intel.com/
> Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
> ---
> drivers/spi/spi-aspeed-smc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c
> index e8bd8fe6c4e7..179c47ffbfeb 100644
> --- a/drivers/spi/spi-aspeed-smc.c
> +++ b/drivers/spi/spi-aspeed-smc.c
> @@ -396,7 +396,7 @@ static int aspeed_spi_set_window(struct aspeed_spi *aspi)
>
> for (cs = 0; cs < aspi->data->max_cs; cs++) {
> if (aspi->chips[cs].ahb_base) {
> - iounmap(aspi->chips[cs].ahb_base);
> + devm_iounmap(dev, aspi->chips[cs].ahb_base);
> aspi->chips[cs].ahb_base = NULL;
> }
> }
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-05 8:49 [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory Chin-Ting Kuo
2025-11-05 8:52 ` Cédric Le Goater
2025-11-05 14:35 ` Paul Menzel
@ 2025-11-05 17:44 ` Markus Elfring
2025-11-06 2:53 ` Chin-Ting Kuo
2025-11-06 11:34 ` Mark Brown
3 siblings, 1 reply; 8+ messages in thread
From: Markus Elfring @ 2025-11-05 17:44 UTC (permalink / raw)
To: Chin-Ting Kuo, linux-spi, linux-aspeed, linux-arm-kernel, openbmc,
Cédric Le Goater, Paul Menzel
Cc: lkp, LKML, Andrew Jeffery, Joel Stanley, Mark Brown
> The AHB IO memory for each chip select is mapped using
> devm_ioremap(), so it should be unmapped using devm_iounmap()
> to ensure proper device-managed resource cleanup.
…
* You may occasionally put more than 61 characters into text lines
of such a change description.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc4#n658
* Would another imperative wording become helpful for an improved change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc4#n94
Regards,
Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-05 17:44 ` Markus Elfring
@ 2025-11-06 2:53 ` Chin-Ting Kuo
2025-11-06 7:02 ` Markus Elfring
0 siblings, 1 reply; 8+ messages in thread
From: Chin-Ting Kuo @ 2025-11-06 2:53 UTC (permalink / raw)
To: Markus Elfring, linux-spi@vger.kernel.org,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org,
Cédric Le Goater, Paul Menzel
Cc: lkp@intel.com, LKML, Andrew Jeffery, Joel Stanley, Mark Brown,
BMC-SW
Hi Markus,
> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@web.de>
> Sent: Thursday, November 6, 2025 1:44 AM
> Subject: Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap
> devm_ioremap() memory
>
> > The AHB IO memory for each chip select is mapped using devm_ioremap(),
> > so it should be unmapped using devm_iounmap() to ensure proper
> > device-managed resource cleanup.
> …
>
> * You may occasionally put more than 61 characters into text lines
> of such a change description.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docume
> ntation/process/submitting-patches.rst?h=v6.18-rc4#n658
>
The line characters number is 75 instead of 61. Isn't it?
> * Would another imperative wording become helpful for an improved change
> description?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docume
> ntation/process/submitting-patches.rst?h=v6.18-rc4#n94
>
How about change the description to the below one?
Use devm_iounmap() to unmap memory mapped with devm_ioremap().
This ensures proper cleanup of device-managed resources.
>
> Regards,
> Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-06 2:53 ` Chin-Ting Kuo
@ 2025-11-06 7:02 ` Markus Elfring
2025-11-06 8:02 ` Chin-Ting Kuo
0 siblings, 1 reply; 8+ messages in thread
From: Markus Elfring @ 2025-11-06 7:02 UTC (permalink / raw)
To: Chin-Ting Kuo, linux-spi, linux-aspeed, linux-arm-kernel, openbmc,
Cédric Le Goater, Paul Menzel
Cc: lkp, LKML, Andrew Jeffery, Joel Stanley, Mark Brown, BMC-SW
> How about change the description to the below one?
>
> Use devm_iounmap() to unmap memory mapped with devm_ioremap().
> This ensures proper cleanup of device-managed resources.
Thus ensure?
Regards,
Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-06 7:02 ` Markus Elfring
@ 2025-11-06 8:02 ` Chin-Ting Kuo
0 siblings, 0 replies; 8+ messages in thread
From: Chin-Ting Kuo @ 2025-11-06 8:02 UTC (permalink / raw)
To: Markus Elfring, linux-spi@vger.kernel.org,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org,
Cédric Le Goater, Paul Menzel
Cc: lkp@intel.com, LKML, Andrew Jeffery, Joel Stanley, Mark Brown,
BMC-SW
Hi Markus,
> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@web.de>
> Sent: Thursday, November 6, 2025 3:02 PM
> Subject: Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap
> devm_ioremap() memory
>
> > How about change the description to the below one?
> >
> > Use devm_iounmap() to unmap memory mapped with devm_ioremap().
> > This ensures proper cleanup of device-managed resources.
>
> Thus ensure?
Okay, I will update a new version.
Use devm_iounmap() to unmap memory mapped with devm_ioremap().
Thus ensure proper cleanup of device-managed resources.
>
> Regards,
> Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
2025-11-05 8:49 [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory Chin-Ting Kuo
` (2 preceding siblings ...)
2025-11-05 17:44 ` Markus Elfring
@ 2025-11-06 11:34 ` Mark Brown
3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2025-11-06 11:34 UTC (permalink / raw)
To: joel, andrew, clg, linux-aspeed, openbmc, linux-spi,
linux-arm-kernel, linux-kernel, Chin-Ting Kuo
Cc: kernel test robot
On Wed, 05 Nov 2025 16:49:52 +0800, Chin-Ting Kuo wrote:
> The AHB IO memory for each chip select is mapped using
> devm_ioremap(), so it should be unmapped using devm_iounmap()
> to ensure proper device-managed resource cleanup.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
commit: 2f538ef9f6f7c3d700c68536f21447dfc598f8c8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-11-06 11:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 8:49 [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory Chin-Ting Kuo
2025-11-05 8:52 ` Cédric Le Goater
2025-11-05 14:35 ` Paul Menzel
2025-11-05 17:44 ` Markus Elfring
2025-11-06 2:53 ` Chin-Ting Kuo
2025-11-06 7:02 ` Markus Elfring
2025-11-06 8:02 ` Chin-Ting Kuo
2025-11-06 11:34 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox