lkml.org 
[lkml]   [2008]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [REVIEW for merge] kbuild updates including silence of section mismatch check
On Sat, 2 Feb 2008, Sam Ravnborg wrote:
> The most visible change is that I have made all the section mismatch
> go away and in the end of the build modpost report the number
> of section mismatch warnings and how to see detail.
>
> The typical output is now:
>
> modpost: Found 35 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'

Can we get a `warning' string literal in that message, so I notice it when
grepping for compiler warnings?

... Ah, there already exists a warn() routine, so let's use it.

Subject: modpost: Use warn() for announcing section mismatches

From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

modpost: Use warn() for announcing section mismatches, for easy grepping for
warnings in build logs.

Also change an existing call from fprintf() to warn() while we're at it.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
scripts/mod/modpost.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1129,10 +1129,10 @@ static void report_sec_mismatch(const ch
if (!sec_mismatch_verbose)
return;

- fprintf(stderr, "WARNING: %s(%s+0x%llx): Section mismatch in"
- " reference from the %s %s%s to the %s %s:%s%s\n",
- modname, fromsec, fromaddr, from, fromsym, from_p,
- to, tosec, tosym, to_p);
+ warn("%s(%s+0x%llx): Section mismatch in reference from the %s %s%s "
+ "to the %s %s:%s%s\n",
+ modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec,
+ tosym, to_p);

switch (mismatch) {
case TEXT_TO_INIT:
@@ -1938,10 +1938,10 @@ int main(int argc, char **argv)
if (dump_write)
write_dump(dump_write);
if (sec_mismatch_count && !sec_mismatch_verbose)
- fprintf(stderr, "modpost: Found %d section mismatch(es).\n"
- "To see full details build your kernel with:\n"
- "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
- sec_mismatch_count);
+ warn("modpost: Found %d section mismatch(es).\n"
+ "To see full details build your kernel with:\n"
+ "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
+ sec_mismatch_count);

return err;
}
With kind regards,

Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
\
 
 \ /
  Last update: 2008-02-05 11:41    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site