[PATCH 3/3] dm: core: Mark root_info as const

Michal Simek michal.simek at amd.com
Fri Jul 25 14:01:22 CEST 2025


root_info driver structure is not changing that's why mark them as const
which ensure that structure will be moved from .data section to .rodata
section.

Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 drivers/core/root.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/core/root.c b/drivers/core/root.c
index e53381e3b32a..d43645f34ddb 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -32,7 +32,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static struct driver_info root_info = {
+static const struct driver_info root_info = {
 	.name		= "root_driver",
 };
 
-- 
2.43.0

base-commit: 7178360d325a7ea5356b993a7f4156e4e1e80719


More information about the U-Boot mailing list