diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2016-06-07 04:05:53 -0400 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2016-06-10 04:29:20 -0400 |
| commit | c9b2cfb3faece55df7f50b4ab76bc00ac8e06700 (patch) | |
| tree | f3095ffc4c048dbc2063681700acb69e9a98c1a7 /scripts/kernel-doc | |
| parent | 88c2b57da4ce3c8b5f849dc5356bdea9e2ed1134 (diff) | |
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>
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9708a87c7069..932b3f34ff06 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -61,10 +61,10 @@ Output format selection (mutually exclusive): | |||
| 61 | Output selection (mutually exclusive): | 61 | Output selection (mutually exclusive): |
| 62 | -export Only output documentation for symbols that have been | 62 | -export Only output documentation for symbols that have been |
| 63 | exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL() | 63 | 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. |
| 65 | -internal Only output documentation for symbols that have NOT been | 65 | -internal Only output documentation for symbols that have NOT been |
| 66 | exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL() | 66 | 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. |
| 68 | -function NAME Only output documentation for the given function(s) | 68 | -function NAME Only output documentation for the given function(s) |
| 69 | or DOC: section title(s). All other functions and DOC: | 69 | or DOC: section title(s). All other functions and DOC: |
| 70 | sections are ignored. May be specified multiple times. | 70 | sections are ignored. May be specified multiple times. |
| @@ -2792,17 +2792,6 @@ sub process_file($) { | |||
| 2792 | return; | 2792 | return; |
| 2793 | } | 2793 | } |
| 2794 | 2794 | ||
| 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 | |||
| 2806 | $. = 1; | 2795 | $. = 1; |
| 2807 | 2796 | ||
| 2808 | $section_counter = 0; | 2797 | $section_counter = 0; |
| @@ -3110,6 +3099,9 @@ if (open(SOURCE_MAP, "<.tmp_filelist.txt")) { | |||
| 3110 | 3099 | ||
| 3111 | if ($output_selection == OUTPUT_EXPORTED || | 3100 | if ($output_selection == OUTPUT_EXPORTED || |
| 3112 | $output_selection == OUTPUT_INTERNAL) { | 3101 | $output_selection == OUTPUT_INTERNAL) { |
| 3102 | |||
| 3103 | push(@export_file_list, @ARGV); | ||
| 3104 | |||
| 3113 | foreach (@export_file_list) { | 3105 | foreach (@export_file_list) { |
| 3114 | chomp; | 3106 | chomp; |
| 3115 | process_export_file($_); | 3107 | process_export_file($_); |
