linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [2.6.22] powerpc: section mismatch for macmodes.c:mac_find_mode()
@ 2007-07-09 23:47 Mikael Pettersson
  2007-07-10  0:19 ` [2.6 patch] drivers/video/macmodes.c:mac_find_mode() mustn't be __devinit Adrian Bunk
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2007-07-09 23:47 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel

A vanilla 2.6.22 built for ppc32 and configured with CONFIG_FB_MACMODES=y, CONFIG_HOTPLUG=n,
and CONFIG_MODULES=y, triggers the following warning from modpost:

WARNING: drivers/built-in.o(__ksymtab+0x3b0): Section mismatch: reference to .init.text:mac_find_mode (between '__ksymtab_mac_find_mode' and '__ksymtab_mac_map_monitor_sense')

There's an EXPORT_SYMBOL(mac_find_mode), but mac_find_mode() is __devinit
and thus __init in this kernel.

/Mikael

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

* [2.6 patch] drivers/video/macmodes.c:mac_find_mode() mustn't be __devinit
  2007-07-09 23:47 [2.6.22] powerpc: section mismatch for macmodes.c:mac_find_mode() Mikael Pettersson
@ 2007-07-10  0:19 ` Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2007-07-10  0:19 UTC (permalink / raw)
  To: Mikael Pettersson, adaplas
  Cc: linuxppc-dev, Andrew Morton, linux-kernel, stable

On Tue, Jul 10, 2007 at 01:47:14AM +0200, Mikael Pettersson wrote:
> A vanilla 2.6.22 built for ppc32 and configured with CONFIG_FB_MACMODES=y, CONFIG_HOTPLUG=n,
> and CONFIG_MODULES=y, triggers the following warning from modpost:
> 
> WARNING: drivers/built-in.o(__ksymtab+0x3b0): Section mismatch: reference to .init.text:mac_find_mode (between '__ksymtab_mac_find_mode' and '__ksymtab_mac_map_monitor_sense')
> 
> There's an EXPORT_SYMBOL(mac_find_mode), but mac_find_mode() is __devinit
> and thus __init in this kernel.

So let's fix it.  ;-)

> /Mikael

cu
Adrian


<--  snip  -->


If it's EXPORT_SYMBOL'ed it can't be __devinit.

Reported by Mikael Pettersson.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

@stable:
Fixes a real bug on ppc.

 drivers/video/macmodes.c |    5 ++---
 drivers/video/macmodes.h |    8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

--- linux-2.6.22-rc6-mm1/drivers/video/macmodes.h.old	2007-07-10 01:55:14.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/video/macmodes.h	2007-07-10 01:55:29.000000000 +0200
@@ -55,10 +55,10 @@
 extern int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
 			    int *cmode);
 extern int mac_map_monitor_sense(int sense);
-extern int __devinit mac_find_mode(struct fb_var_screeninfo *var,
-				   struct fb_info *info,
-				   const char *mode_option,
-				   unsigned int default_bpp);
+extern int mac_find_mode(struct fb_var_screeninfo *var,
+			 struct fb_info *info,
+			 const char *mode_option,
+			 unsigned int default_bpp);
 
 
     /*
--- linux-2.6.22-rc6-mm1/drivers/video/macmodes.c.old	2007-07-10 01:54:36.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/video/macmodes.c	2007-07-10 01:55:04.000000000 +0200
@@ -369,9 +369,8 @@
  *
  */
 
-int __devinit mac_find_mode(struct fb_var_screeninfo *var,
-			    struct fb_info *info, const char *mode_option,
-			    unsigned int default_bpp)
+int mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
+		  const char *mode_option, unsigned int default_bpp)
 {
     const struct fb_videomode *db = NULL;
     unsigned int dbsize = 0;

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

end of thread, other threads:[~2007-07-10  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09 23:47 [2.6.22] powerpc: section mismatch for macmodes.c:mac_find_mode() Mikael Pettersson
2007-07-10  0:19 ` [2.6 patch] drivers/video/macmodes.c:mac_find_mode() mustn't be __devinit Adrian Bunk

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