Skip to contentSkip to conversation

uvesafb: fix section mismatch warnings

PATCH In review Randy Dunlap 2 participants 4 messages Jan 12, 2008 – Jan 14, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uvesafb: fix section mismatch warnings

From: Randy Dunlap <[email protected]>

Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

Variable 'blank' cannot be __devinitdata since it is referenced in an fb_ops method that could be called at any time.

WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')
WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')

---
 drivers/video/uvesafb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/uvesafb.c +2 -2
@@ -43,7 +43,7 @@ static struct fb_fix_screeninfo uvesafb_
 };
 
 static int mtrr		__devinitdata = 3; /* enable mtrr by default */
-static int blank	__devinitdata = 1; /* enable blanking by default */
+static int blank	= 1;		   /* enable blanking by default */
 static int ypan		__devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */
 static int pmi_setpal	__devinitdata = 1; /* use PMI for palette changes */
 static int nocrtc	__devinitdata; /* ignore CRTC settings */
@@ -1549,7 +1549,7 @@ static void __devinit uvesafb_init_info(
 		info->fbops->fb_pan_display = NULL;
 }
 
-static void uvesafb_init_mtrr(struct fb_info *info)
+static void __devinit uvesafb_init_mtrr(struct fb_info *info)
 {
 #ifdef CONFIG_MTRR
 	if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) {

---
~Randy

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#1 lore raw
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

OK

Quoted 3 lines

Variable 'blank' cannot be __devinitdata since it is referenced in an fb_ops method that could be called at any time.

The patch is correct but the explanation is wrong. uvesafb uses local variables named blank in two spots that hides the global defined blank which I assume has confused you.

The problematic spot is this use as a parameter:
module_param(blank, bool, 0); MODULE_PARM_DESC(blank, "Enable hardware blanking");

This is at least how I understand it looking at the code.

Sam

Quoted 30 lines

WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')
WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')

---
 drivers/video/uvesafb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/uvesafb.c +2 -3
@@ -43,7 +43,7 @@ static struct fb_fix_screeninfo uvesafb_
 };
 
 static int mtrr		__devinitdata = 3; /* enable mtrr by default */
-static int blank	__devinitdata = 1; /* enable blanking by default */
+static int blank	= 1;		   /* enable blanking by default */
 static int ypan		__devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */
 static int pmi_setpal	__devinitdata = 1; /* use PMI for palette changes */
 static int nocrtc	__devinitdata; /* ignore CRTC settings */
@@ -1549,7 +1549,7 @@ static void __devinit uvesafb_init_info(
 		info->fbops->fb_pan_display = NULL;
 }
 
-static void uvesafb_init_mtrr(struct fb_info *info)
+static void __devinit uvesafb_init_mtrr(struct fb_info *info)
 {
 #ifdef CONFIG_MTRR
 	if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) {
---
Quoted 1 line

~Randy

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#2 lore raw
Quoted 11 lines · On Sat, 12 Jan 2008 11:42:03 +0100 Sam Ravnborg wrote:
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

OK

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

Variable 'blank' cannot be __devinitdata since it is referenced in an fb_ops method that could be called at any time.

The patch is correct but the explanation is wrong. uvesafb uses local variables named blank in two spots that hides the global defined blank which I assume has confused you.

Ack, thanks.

Quoted 34 lines

The problematic spot is this use as a parameter:
module_param(blank, bool, 0); MODULE_PARM_DESC(blank, "Enable hardware blanking");

This is at least how I understand it looking at the code.

Sam

Quoted 24 lines

WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')
WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')

---
 drivers/video/uvesafb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/uvesafb.c +1 -1
@@ -43,7 +43,7 @@ static struct fb_fix_screeninfo uvesafb_
 };
 
 static int mtrr		__devinitdata = 3; /* enable mtrr by default */
-static int blank	__devinitdata = 1; /* enable blanking by default */
+static int blank	= 1;		   /* enable blanking by default */
 static int ypan		__devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */
 static int pmi_setpal	__devinitdata = 1; /* use PMI for palette changes */
 static int nocrtc	__devinitdata; /* ignore CRTC settings */
@@ -1549,7 +1549,7 @@ static void __devinit uvesafb_init_info(
 		info->fbops->fb_pan_display = NULL;
 }
 
Quoted 8 lines
Quoted 7 lines
drivers/video/uvesafb.c +1 -2
-static void uvesafb_init_mtrr(struct fb_info *info)
+static void __devinit uvesafb_init_mtrr(struct fb_info *info)
 {
 #ifdef CONFIG_MTRR
 	if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) {
---

~Randy

---
~Randy

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

#3 lore raw
Quoted 13 lines · Randy Dunlap
Quoted 11 lines · On Sat, 12 Jan 2008 11:42:03 +0100 Sam Ravnborg wrote:
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

OK

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Variable 'blank' cannot be __devinitdata since it is referenced in an fb_ops method that could be called at any time.

The patch is correct but the explanation is wrong. uvesafb uses local variables named blank in two spots that hides the global defined blank which I assume has confused you.

Ack, thanks.

Randy - can I ask you to send an updated version with a correct changelog. I think Andrew queued this due to my comment awaiting a conclusion.

Thanks,
Sam

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace