Merge tag 'for-linus-4.8-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubca...
[deliverable/linux.git] / scripts / kernel-doc
index 9708a87c706999ee69f9c7080eb2377c750d3688..4f2e9049e8fa4219218b9ccc7ffd50d9558f1016 100755 (executable)
@@ -61,10 +61,10 @@ Output format selection (mutually exclusive):
 Output selection (mutually exclusive):
   -export              Only output documentation for symbols that have been
                        exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
-                        in the same FILE or any -export-file FILE.
+                        in any input FILE or -export-file FILE.
   -internal            Only output documentation for symbols that have NOT been
                        exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
-                        in the same FILE or any -export-file FILE.
+                        in any input FILE or -export-file FILE.
   -function NAME       Only output documentation for the given function(s)
                        or DOC: section title(s). All other functions and DOC:
                        sections are ignored. May be specified multiple times.
@@ -1848,6 +1848,10 @@ sub output_function_rst(%) {
        }
        $count++;
        $type = $args{'parametertypes'}{$parameter};
+
+       # RST doesn't like address_space tags at function prototypes
+       $type =~ s/__(user|kernel|iomem|percpu|pmem|rcu)\s*//;
+
        if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
            # pointer-to-function
            print $1 . $parameter . ") (" . $2;
@@ -2792,17 +2796,6 @@ sub process_file($) {
        return;
     }
 
-    # two passes for -export and -internal
-    if ($output_selection == OUTPUT_EXPORTED ||
-       $output_selection == OUTPUT_INTERNAL) {
-       while (<IN>) {
-           if (/$export_symbol/o) {
-               $function_table{$2} = 1;
-           }
-       }
-       seek(IN, 0, 0);
-    }
-
     $. = 1;
 
     $section_counter = 0;
@@ -3005,7 +2998,7 @@ sub process_file($) {
                    }
                } elsif ($inline_doc_state == STATE_INLINE_NAME) {
                    $inline_doc_state = STATE_INLINE_ERROR;
-                   print STDERR "Warning(${file}:$.): ";
+                   print STDERR "${file}:$.: warning: ";
                    print STDERR "Incorrect use of kernel-doc format: $_";
                    ++$warnings;
                }
@@ -3110,6 +3103,9 @@ if (open(SOURCE_MAP, "<.tmp_filelist.txt")) {
 
 if ($output_selection == OUTPUT_EXPORTED ||
     $output_selection == OUTPUT_INTERNAL) {
+
+    push(@export_file_list, @ARGV);
+
     foreach (@export_file_list) {
        chomp;
        process_export_file($_);
This page took 0.043611 seconds and 5 git commands to generate.