modpost: Make verbose mismatches errors

When compiling with CONFIG_DEBUG_SECTION_MISMATCHES, compilation
will still currently succeed even though there is still a mismatch.
Fix this by putting the check in a different place.

Change-Id: I631203803ab9d78e9d57afecbe602aaf37d05dc6
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
(cherry picked from commit 54cb83c041bc65d3501e4f5cd94d9cc7f68b950f)
This commit is contained in:
Laura Abbott 2011-01-14 12:34:51 -08:00 committed by Stephen Boyd
parent 1bf41f8a12
commit 890bcc7532

View file

@ -2213,14 +2213,15 @@ int main(int argc, char **argv)
"'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
sec_mismatch_count);
if (section_error_on_mismatch) {
}
if (sec_mismatch_count && section_error_on_mismatch) {
err |= 1;
printf(
"To build the kernel despite the mismatches, "
"build with:\n'make CONFIG_NO_ERROR_ON_MISMATCH=y'\n"
"(NOTE: This is not recommended)\n");
}
}
return err;
}