From: Daniel Palmer <daniel@thingy.jp>
To: robh@kernel.org, saravanak@kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Palmer <daniel@thingy.jp>
Subject:
Date: Sat, 27 Jun 2026 02:17:47 +0900 [thread overview]
Message-ID: <20260626171747.202269-1-daniel@thingy.jp> (raw)
From 1a75d7c1077cf785b479cb975e42e09fff2839cd Mon Sep 17 00:00:00 2001
From: Daniel Palmer <daniel@thingy.jp>
Date: Fri, 18 Apr 2025 18:28:26 +0900
Subject: [PATCH] of/address: Drop ISA parts when !CONFIG_ISA
The PCI parts are already wrapped in #ifdef CONFIG_PCI
so it seems sensible to add #ifdef CONFIG_ISA around the ISA
parts.
This reduces the code/data size a bit on configs with !CONFIG_ISA.
Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
I thought about making this RFC as I'm a bit unsure if machines
that need this ISA stuff actually select CONFIG_ISA or not.
The only in-kernel devicetrees that seem to use this are 4 old powerpc
ones and I couldn't work out if those boards do end up with CONFIG_ISA.
But then again it seems odd for everyone to get this code for 4 old
boards.
drivers/of/address.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/of/address.c b/drivers/of/address.c
index cf4aab11e9b1..9b2f0d462fb5 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -277,6 +277,7 @@ int of_range_to_resource(struct device_node *np, int index, struct resource *res
}
EXPORT_SYMBOL(of_range_to_resource);
+#ifdef CONFIG_ISA
/*
* ISA bus specific translator
*/
@@ -316,6 +317,7 @@ static unsigned int of_bus_isa_get_flags(const __be32 *addr)
flags |= IORESOURCE_MEM;
return flags;
}
+#endif
static int of_bus_default_flags_match(struct device_node *np)
{
@@ -349,6 +351,7 @@ static const struct of_bus of_busses[] = {
.get_flags = of_bus_pci_get_flags,
},
#endif /* CONFIG_PCI */
+#ifdef CONFIG_ISA
/* ISA */
{
.name = "isa",
@@ -360,6 +363,7 @@ static const struct of_bus of_busses[] = {
.flag_cells = 1,
.get_flags = of_bus_isa_get_flags,
},
+#endif /* CONFIG_ISA */
/* Default with flags cell */
{
.name = "default-flags",
--
2.53.0
next reply other threads:[~2026-06-26 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 17:17 Daniel Palmer [this message]
2026-06-26 17:33 ` (no subject) sashiko-bot
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=20260626171747.202269-1-daniel@thingy.jp \
--to=daniel@thingy.jp \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.