From: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
To: <joel@jms.id.au>, <andrew@codeconstruct.com.au>, <clg@kaod.org>,
<broonie@kernel.org>, <linux-aspeed@lists.ozlabs.org>,
<openbmc@lists.ozlabs.org>, <linux-spi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: kernel test robot <lkp@intel.com>
Subject: [PATCH] spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory
Date: Wed, 5 Nov 2025 16:49:52 +0800 [thread overview]
Message-ID: <20251105084952.1063489-1-chin-ting_kuo@aspeedtech.com> (raw)
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
next reply other threads:[~2025-11-05 8:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 8:49 Chin-Ting Kuo [this message]
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
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=20251105084952.1063489-1-chin-ting_kuo@aspeedtech.com \
--to=chin-ting_kuo@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=broonie@kernel.org \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=openbmc@lists.ozlabs.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
all inboxes | Powered by JetHome®