[PATCH] pm3fb: fix section mismatch warnings

STALE6775d

3 messages, 3 authors, 2008-01-12 · open the first message on its own page

[PATCH] pm3fb: fix section mismatch warnings

From: Randy Dunlap <hidden>
Date: 2008-01-12 01:04:14

From: Randy Dunlap <redacted>

Add __devinit to one function to clean up section mismatch warnings:

WARNING: vmlinux.o(.text+0x47c176): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c188): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c1ba): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c1c1): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c1e2): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c1e9): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c2f0): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')
WARNING: vmlinux.o(.text+0x47c2f7): Section mismatch: reference to .init.data: (between 'pm3fb_size_memory' and 'update_crtc2')

Signed-off-by: Randy Dunlap <redacted>
---
 drivers/video/pm3fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.24-rc7-git1.orig/drivers/video/pm3fb.c
+++ linux-2.6.24-rc7-git1/drivers/video/pm3fb.c
@@ -1227,7 +1227,7 @@ static struct fb_ops pm3fb_ops = {
 
 /* mmio register are already mapped when this function is called */
 /* the pm3fb_fix.smem_start is also set */
-static unsigned long pm3fb_size_memory(struct pm3_par *par)
+static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par)
 {
 	unsigned long	memsize = 0;
 	unsigned long	tempBypass, i, temp1, temp2;
---
~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

Re: [PATCH] pm3fb: fix section mismatch warnings

From: Krzysztof Helt <hidden>
Date: 2008-01-12 04:14:57

On Fri, 11 Jan 2008 17:04:01 -0800
Randy Dunlap [off-list ref] wrote:
From: Randy Dunlap <redacted>

Add __devinit to one function to clean up section mismatch warnings:


 /* mmio register are already mapped when this function is called */
 /* the pm3fb_fix.smem_start is also set */
-static unsigned long pm3fb_size_memory(struct pm3_par *par)
+static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par)
 {
Exactly the same patch is already in the -mm tree (by Adrian Bunk):
drivers-video-pm3fbc-section-fix.patch

Regards,
Krzysztof

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

Re: [PATCH] pm3fb: fix section mismatch warnings

From: Sam Ravnborg <hidden>
Date: 2008-01-12 10:34:13

On Sat, Jan 12, 2008 at 05:18:29AM +0100, Krzysztof Helt wrote:
On Fri, 11 Jan 2008 17:04:01 -0800
Randy Dunlap [off-list ref] wrote:
quoted
From: Randy Dunlap <redacted>

Add __devinit to one function to clean up section mismatch warnings:


 /* mmio register are already mapped when this function is called */
 /* the pm3fb_fix.smem_start is also set */
-static unsigned long pm3fb_size_memory(struct pm3_par *par)
+static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par)
 {
Exactly the same patch is already in the -mm tree (by Adrian Bunk):
drivers-video-pm3fbc-section-fix.patch
Such obviously correct fixes should be pushed towards mainline sooner.
With all the warnings being fixed lately by Randy and others we are now
at the point where it is sensible to turn this check from a warning
to an error so we really get them fixed before hitting -mm or -mainline
with new code.

It will most likely happen at -rc1 time and then I will see how much
noise it results in.

The rationale is that a precentage of the warnings are actually
real bugs waiting to trigger. This patch is not one of these but
it does hide the real ones.

	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help