Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741617 > unrolled thread

[PATCH] [IA64] sn: make sn_screen_info const, static and __initconst

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-09-28 17:20 +0200
Last post2017-09-28 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] [IA64] sn: make sn_screen_info const, static and __initconst Bhumika Goyal <bhumirks@gmail.com> - 2017-09-28 17:20 +0200

#1741617 — [PATCH] [IA64] sn: make sn_screen_info const, static and __initconst

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-09-28 17:20 +0200
Subject[PATCH] [IA64] sn: make sn_screen_info const, static and __initconst
Message-ID<uuILv-2bi-11@gated-at.bofh.it>
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 arch/ia64/sn/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 5f6b6b4..5f4b15f 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -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,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web