Merge branch 'for-viro' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[linux-2.6-block.git] / scripts / kernel-doc
index 41eade332307f7b43c169f52681913c802af517d..4f2e9049e8fa4219218b9ccc7ffd50d9558f1016 100755 (executable)
@@ -1833,7 +1833,7 @@ sub output_function_rst(%) {
     my $oldprefix = $lineprefix;
     my $start;
 
-    print ".. cpp:function:: ";
+    print ".. c:function:: ";
     if ($args{'functiontype'} ne "") {
        $start = $args{'functiontype'} . " " . $args{'function'} . " (";
     } else {
@@ -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;
@@ -2994,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;
                }