linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] uvesafb: fix section mismatch warnings
@ 2008-01-12  1:04 Randy Dunlap
  2008-01-12 10:42 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2008-01-12  1:04 UTC (permalink / raw)
  To: linux-fbdev-devel, spock; +Cc: akpm, samr, adaplas

From: Randy Dunlap <randy.dunlap@oracle.com>

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')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/video/uvesafb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.24-rc7-git1.orig/drivers/video/uvesafb.c
+++ linux-2.6.24-rc7-git1/drivers/video/uvesafb.c
@@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] uvesafb: fix section mismatch warnings
  2008-01-12  1:04 [PATCH] uvesafb: fix section mismatch warnings Randy Dunlap
@ 2008-01-12 10:42 ` Sam Ravnborg
  2008-01-13 18:31   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2008-01-12 10:42 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: spock, linux-fbdev-devel, akpm, adaplas

On Fri, Jan 11, 2008 at 05:04:09PM -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> 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

> 
> 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



> 
> 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')
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  drivers/video/uvesafb.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux-2.6.24-rc7-git1.orig/drivers/video/uvesafb.c
> +++ linux-2.6.24-rc7-git1/drivers/video/uvesafb.c
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] uvesafb: fix section mismatch warnings
  2008-01-12 10:42 ` Sam Ravnborg
@ 2008-01-13 18:31   ` Randy Dunlap
  2008-01-14 13:53     ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2008-01-13 18:31 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: spock, linux-fbdev-devel, akpm, adaplas

On Sat, 12 Jan 2008 11:42:03 +0100 Sam Ravnborg wrote:

> On Fri, Jan 11, 2008 at 05:04:09PM -0800, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > 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
> 
> > 
> > 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.

> 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
> 
> 
> 
> > 
> > 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')
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> > ---
> >  drivers/video/uvesafb.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > --- linux-2.6.24-rc7-git1.orig/drivers/video/uvesafb.c
> > +++ linux-2.6.24-rc7-git1/drivers/video/uvesafb.c
> > @@ -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
> 


---
~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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] uvesafb: fix section mismatch warnings
  2008-01-13 18:31   ` Randy Dunlap
@ 2008-01-14 13:53     ` Sam Ravnborg
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2008-01-14 13:53 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: spock, linux-fbdev-devel, akpm, adaplas

On Sun, Jan 13, 2008 at 10:31:34AM -0800, Randy Dunlap wrote:
> On Sat, 12 Jan 2008 11:42:03 +0100 Sam Ravnborg wrote:
> 
> > On Fri, Jan 11, 2008 at 05:04:09PM -0800, Randy Dunlap wrote:
> > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > 
> > > 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
> > 
> > > 
> > > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-14 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12  1:04 [PATCH] uvesafb: fix section mismatch warnings Randy Dunlap
2008-01-12 10:42 ` Sam Ravnborg
2008-01-13 18:31   ` Randy Dunlap
2008-01-14 13:53     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).