kbuild/modpost: Use warn() for announcing section mismatches
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tue, 5 Feb 2008 10:38:49 +0000 (11:38 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 9 Feb 2008 09:43:58 +0000 (10:43 +0100)
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>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/mod/modpost.c

index 32e9d8ffceefa3e14c18e486ac25b682bc43ebe9..dbe1fb5e8cc03f6dbeeea4f5c92173d2a4ce1e66 100644 (file)
@@ -1136,10 +1136,10 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch,
        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:
@@ -1945,10 +1945,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;
 }