Skip to content

Commit c9b2cfb

Browse files
committed
kernel-doc: unify all EXPORT_SYMBOL scanning to one place
Scan all input files for EXPORT_SYMBOLs along with the explicitly specified export files before actually parsing anything. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 88c2b57 commit c9b2cfb

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

‎scripts/kernel-doc‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ Output format selection (mutually exclusive):
6161
Output selection (mutually exclusive):
6262
-export Only output documentation for symbols that have been
6363
exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
64-
in the same FILE or any -export-file FILE.
64+
in any input FILE or -export-file FILE.
6565
-internal Only output documentation for symbols that have NOT been
6666
exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
67-
in the same FILE or any -export-file FILE.
67+
in any input FILE or -export-file FILE.
6868
-function NAME Only output documentation for the given function(s)
6969
or DOC: section title(s). All other functions and DOC:
7070
sections are ignored. May be specified multiple times.
@@ -2792,17 +2792,6 @@ sub process_file($) {
27922792
return;
27932793
}
27942794

2795-
# two passes for -export and -internal
2796-
if ($output_selection == OUTPUT_EXPORTED ||
2797-
$output_selection == OUTPUT_INTERNAL) {
2798-
while (<IN>) {
2799-
if (/$export_symbol/o) {
2800-
$function_table{$2} = 1;
2801-
}
2802-
}
2803-
seek(IN, 0, 0);
2804-
}
2805-
28062795
$. = 1;
28072796

28082797
$section_counter = 0;
@@ -3110,6 +3099,9 @@ if (open(SOURCE_MAP, "<.tmp_filelist.txt")) {
31103099

31113100
if ($output_selection == OUTPUT_EXPORTED ||
31123101
$output_selection == OUTPUT_INTERNAL) {
3102+
3103+
push(@export_file_list, @ARGV);
3104+
31133105
foreach (@export_file_list) {
31143106
chomp;
31153107
process_export_file($_);

0 commit comments

Comments
 (0)