Skip to contentSkip to conversation

x86: boot - fix sparse warnings

PATCH Applied Hannes Eder 2 participants 2 messages Nov 23, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: boot - fix sparse warnings

Fix this sparse warnings:

arch/x86/boot/video.c:233:3: warning: symbol 'saved' was not declared. Should it be static?
arch/x86/boot/video-vga.c:37:13: warning: symbol 'video_vga' was not declared. Should it be static?

---
 arch/x86/boot/video-vga.c |    4 ++--
 arch/x86/boot/video.c     |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/boot/video-vga.c +2 -2
index b939cb4..5d4742e 100644
@@ -34,7 +34,7 @@ static struct mode_info cga_modes[] = {
 	{ VIDEO_80x25,  80, 25, 0 },
 };
 
-__videocard video_vga;
+static __videocard video_vga;
 
 /* Set basic 80x25 mode */
 static u8 vga_set_basic_mode(void)
@@ -259,7 +259,7 @@ static int vga_probe(void)
 	return mode_count[adapter];
 }
 
-__videocard video_vga = {
+static __videocard video_vga = {
 	.card_name	= "VGA",
 	.probe		= vga_probe,
 	.set_mode	= vga_set_mode,
arch/x86/boot/video.c +1 -1
index 83598b2..3bef2c1 100644
@@ -226,7 +226,7 @@ static unsigned int mode_menu(void)
 
 #ifdef CONFIG_VIDEO_RETAIN
 /* Save screen content to the heap */
-struct saved_screen {
+static struct saved_screen {
 	int x, y;
 	int curx, cury;
 	u16 *data;
Applied
#1 lore raw
Quoted 7 lines · Hannes Eder

Fix this sparse warnings:

arch/x86/boot/video.c:233:3: warning: symbol 'saved' was not declared. Should it be static?
arch/x86/boot/video-vga.c:37:13: warning: symbol 'video_vga' was not declared. Should it be static?

Quoted 5 lines
---
 arch/x86/boot/video-vga.c |    4 ++--
 arch/x86/boot/video.c     |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

applied to tip/x86/sparse-fixes, thanks Hannes!

Ingo