public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
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: [PATCH] of/platform: Don't include reserved memory compatibles that aren't needed
Date: Wed,  1 Apr 2026 06:57:35 +0900	[thread overview]
Message-ID: <20260331215735.2783770-1-daniel@thingy.jp> (raw)

There are a number of very platform specific compatibles for reserved
memory that the vast majority of people don't need and they waste
196/200 bytes each.

Wrap the platform specific compatibles so that they are only included
if needed.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
 drivers/of/platform.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ba591fbceb56..0e6c2844e542 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -489,12 +489,22 @@ EXPORT_SYMBOL_GPL(of_platform_default_populate);
 
 static const struct of_device_id reserved_mem_matches[] = {
 	{ .compatible = "phram" },
+#if IS_ENABLED(CONFIG_QCOM_RMTFS_MEM)
 	{ .compatible = "qcom,rmtfs-mem" },
+#endif
+#if IS_ENABLED(CONFIG_QCOM_COMMAND_DB)
 	{ .compatible = "qcom,cmd-db" },
+#endif
+#if IS_ENABLED(CONFIG_QCOM_SMEM)
 	{ .compatible = "qcom,smem" },
+#endif
 	{ .compatible = "ramoops" },
+#if IS_ENABLED(CONFIG_NVMEM_RMEM)
 	{ .compatible = "nvmem-rmem" },
+#endif
+#if IS_ENABLED(CONFIG_OPEN_DICE)
 	{ .compatible = "google,open-dice" },
+#endif
 	{}
 };
 
-- 
2.51.0


             reply	other threads:[~2026-03-31 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 21:57 Daniel Palmer [this message]
2026-04-01 10:54 ` [PATCH] of/platform: Don't include reserved memory compatibles that aren't needed Krzysztof Kozlowski
2026-04-04  2:22   ` Daniel Palmer

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=20260331215735.2783770-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox