lkml.org 
[lkml]   [2006]   [Feb]   [4]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateSat, 4 Feb 2006 10:29:41 +0100
FromSam Ravnborg <>
SubjectRe: 2.6.16-rc1-mm5
On Fri, Feb 03, 2006 at 12:07:04AM -0800, Andrew Morton wrote:
> 
> Known problems:
> 
> - Sam has added a new check in the kbuild tree.  It detects multiple
>   instances of EXPORT_SYMBOL(foo) across separate .o files.
> 
>   It catches a _lot_ of problems.   You'll see something like this:

Sigh. I did a 'make allmodconfig' on x86_64 and found to my suprise only
a sinlge symbol being exported more than one time.

This is purely a consistency check introduced by commit:
http://www.kernel.org/git/?p=linux/kernel/git/sam/kbuild.git;a=commit;h=cd1f125e5808203d3bf58f1d04a9cbd33f60fdb6

I can rip it out again if the noise/value ratio is too high.


>   Patches would be nice, but be warned that fixing these is not as trivial
>   as one might think:
> 
>   - If one export is in generic code and the other is in arch code then
> 
>     - If you remove the export in generic code, you need to check all
>       architectures for breakage.
We should IMO try to keep the exports in generic code.
The exports should go with the function definition - right after closing
'{'.
All other ways of exporting function is a call for inconsistency.
A gret deal of effort has been put into getting rid of ksym files
- good. But exports should not be scattered far away form the function
definition.
>     - If you remove the export in arch code then you need to be sure
>       that the generic .o file a) always compiles in the offending function
>       and b) is always linked into vmlinux.
Placing the export just below the function definition should cover this
in 90% of the cases. The rest is macros..

> 
>   If possible, the best approach is to put the EXPORT_SYMBOL
>   immediately after the symbol which is being exported.  And if it's
>   a function, pleeeze don't put a blank line between the end of the
>   function and the export - I've no idea why people do that...
Agreed.

	Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-04 10:32    [W:0.614 / U:0.200 seconds]
©2003-2008 Jasper Spaans