2008-02-02 16:00:41

by Peter Teoh

[permalink] [raw]
Subject: Some fixes for "Section mismatch" errors.

Today, I pulled from linus tree, and compile with MANY section
mismatches errors, eg, some of which are like the following:

WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x1c9f): Section mismatch
in reference from the function hdsp_check_for_firmware() to the
function .devinit.text:hdsp_request_fw_loader()
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x35bf): Section mismatch
in reference from the function snd_hdsp_proc_read() to the function
.devinit.text:hdsp_request_fw_loader()

I have attempted the fixes as shown in the attachment - I may be doing
a disservice to the many hours of hardwork put in by everyone - I
apologized for that :-(. Please comment - I am just correcting it
syntactically to overcome all the section mismatches errors I am
encountering. But logic-wise it may be wrong.

Thanks.


Attachments:
(No filename) (812.00 B)
section_mismatch_bug.patch (9.67 kB)
Download all attachments

2008-02-02 20:42:51

by Sam Ravnborg

[permalink] [raw]
Subject: Re: Some fixes for "Section mismatch" errors.

On Sun, Feb 03, 2008 at 12:00:29AM +0800, Peter Teoh wrote:
> Today, I pulled from linus tree, and compile with MANY section
> mismatches errors, eg, some of which are like the following:
>
> WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x1c9f): Section mismatch
> in reference from the function hdsp_check_for_firmware() to the
> function .devinit.text:hdsp_request_fw_loader()
> WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x35bf): Section mismatch
> in reference from the function snd_hdsp_proc_read() to the function
> .devinit.text:hdsp_request_fw_loader()

Your fix for this particular warning looks OK.
But always do:
-> One fix per patch
-> Include the warning in the patch descript that you fix
-> Explain why you fixed it the way you did it

Without this info it is too time consuming to try to review your patch
and I did nt look at the other changes you included.

Sam