Skip to contentSkip to conversation

sn: make sn_screen_info const, static and __initconst

PATCH New Bhumika Goyal 1 participant 1 message Sep 28, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sn: make sn_screen_info const, static and __initconst

Make this structure static as it is only used in the file in which it is defined. Make it const as it is only used during a copy operation. Make it __initconst as this usage is during the init phase.

Structure found using Coccinelle and changes done by hand.

---
 arch/ia64/sn/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/sn/kernel/setup.c +1 -1
index 5f6b6b4..5f4b15f 100644
@@ -110,7 +110,7 @@
  * code. This is just enough to make the console code think we're on a
  * VGA color display.
  */
-struct screen_info sn_screen_info = {
+static const struct screen_info sn_screen_info __initconst = {
 	.orig_x = 0,
 	.orig_y = 0,
 	.orig_video_mode = 3,
Signature · 1 line
1.9.1