]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
dm: core: Mark root_info as const
authorMichal Simek <michal.simek@amd.com>
Fri, 25 Jul 2025 12:01:22 +0000 (14:01 +0200)
committerMichal Simek <michal.simek@amd.com>
Tue, 26 Aug 2025 05:30:09 +0000 (07:30 +0200)
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@amd.com>
Link: https://lore.kernel.org/r/18d92a93a9863ed0452e82a1f8e0ff9205adb4f9.1753444878.git.michal.simek@amd.com
drivers/core/root.c

index e53381e3b32a6e9d0358763a8f58d1ea58e79f66..d43645f34ddbaf6ba83e8e5eec2ed320473d4639 100644 (file)
@@ -32,7 +32,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static struct driver_info root_info = {
+static const struct driver_info root_info = {
        .name           = "root_driver",
 };