Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
kbuild/modpost: Use warn() for announcing section mismatches
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and sravnborg committed Feb 9, 2008
1 parent ff739b6 commit 7c0ac49
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}

0 comments on commit 7c0ac49

Please sign in to comment.