diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 2 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index fcdfb245a57..102e1235fd5 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1454,6 +1454,8 @@ sub dump_enum($$) { my $file = shift; $x =~ s@/\*.*?\*/@@gos; # strip comments. + $x =~ s/^#\s*define\s+.*$//; # strip #define macros inside enums + if ($x =~ /enum\s+(\w+)\s*{(.*)}/) { $declaration_name = $1; my $members = $2; diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index b16044002d9..1ec7158b6c1 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -14,6 +14,7 @@ #define _GNU_SOURCE #include <stdio.h> #include <ctype.h> +#include <string.h> #include "modpost.h" #include "../../include/generated/autoconf.h" #include "../../include/linux/license.h" @@ -789,6 +790,7 @@ static const char *section_white_list[] = { ".comment*", ".debug*", + ".GCC-command-line", /* mn10300 */ ".mdebug*", /* alpha, score, mips etc. */ ".pdr", /* alpha, score, mips etc. */ ".stab*", @@ -1230,7 +1232,7 @@ static char *sec2annotation(const char *s) strcat(p, " "); return r; /* we leak her but we do not care */ } else { - return ""; + return strdup(""); } } @@ -1365,7 +1367,7 @@ static void report_sec_mismatch(const char *modname, "%s%s so it may be used outside an exit section.\n", from, prl_from, fromsym, from_p, to, prl_to, tosym, to_p, - sec2annotation(tosec), tosym, to_p); + prl_to, tosym, to_p); free(prl_from); free(prl_to); break; |