Skip to contentSkip to conversation

MN10300: make resource __initconst

PATCH Superseded Bhumika Goyal 1 participant 1 message Sep 19, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MN10300: make resource __initconst

Make code_resource and data_resource __initdata as these are only modified during the init phase and after that the structures and their fields are not referenced anywhere.
Done using Coccinelle.

---
 arch/mn10300/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mn10300/kernel/setup.c +2 -2
index 1b3d80d..5c21ef9 100644
@@ -41,13 +41,13 @@
 
 char __initdata redboot_platform_name[COMMAND_LINE_SIZE];
 
-static struct resource code_resource = {
+static struct resource code_resource __initdata = {
 	.start	= 0x100000,
 	.end	= 0,
 	.name	= "Kernel code",
 };
 
-static struct resource data_resource = {
+static struct resource data_resource __initdata = {
 	.start	= 0,
 	.end	= 0,
 	.name	= "Kernel data",
Signature · 1 line
1.9.1