diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-07-16 09:10:07 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-07-16 09:10:07 -0400 |
| commit | d26fad5b38e1c4667d4f2604936e59c837caa54d (patch) | |
| tree | 04b524a69a0129c181567445bff18847a1b44721 /scripts/kernel-doc | |
| parent | e720fff6341fe4b95e5a93c939bd3c77fa55ced4 (diff) | |
| parent | 1795cd9b3a91d4b5473c97f491d63892442212ab (diff) | |
Merge tag 'v3.16-rc5' into sched/core, to refresh the branch before applying bigger tree-wide changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index da058da413e7..16a07cfa4d34 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -2073,6 +2073,7 @@ sub check_return_section { | |||
| 2073 | sub dump_function($$) { | 2073 | sub dump_function($$) { |
| 2074 | my $prototype = shift; | 2074 | my $prototype = shift; |
| 2075 | my $file = shift; | 2075 | my $file = shift; |
| 2076 | my $noret = 0; | ||
| 2076 | 2077 | ||
| 2077 | $prototype =~ s/^static +//; | 2078 | $prototype =~ s/^static +//; |
| 2078 | $prototype =~ s/^extern +//; | 2079 | $prototype =~ s/^extern +//; |
| @@ -2086,7 +2087,7 @@ sub dump_function($$) { | |||
| 2086 | $prototype =~ s/__init_or_module +//; | 2087 | $prototype =~ s/__init_or_module +//; |
| 2087 | $prototype =~ s/__must_check +//; | 2088 | $prototype =~ s/__must_check +//; |
| 2088 | $prototype =~ s/__weak +//; | 2089 | $prototype =~ s/__weak +//; |
| 2089 | $prototype =~ s/^#\s*define\s+//; #ak added | 2090 | my $define = $prototype =~ s/^#\s*define\s+//; #ak added |
| 2090 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 2091 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
| 2091 | 2092 | ||
| 2092 | # Yes, this truly is vile. We are looking for: | 2093 | # Yes, this truly is vile. We are looking for: |
| @@ -2105,7 +2106,15 @@ sub dump_function($$) { | |||
| 2105 | # - atomic_set (macro) | 2106 | # - atomic_set (macro) |
| 2106 | # - pci_match_device, __copy_to_user (long return type) | 2107 | # - pci_match_device, __copy_to_user (long return type) |
| 2107 | 2108 | ||
| 2108 | if ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || | 2109 | if ($define && $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s+/) { |
| 2110 | # This is an object-like macro, it has no return type and no parameter | ||
| 2111 | # list. | ||
| 2112 | # Function-like macros are not allowed to have spaces between | ||
| 2113 | # declaration_name and opening parenthesis (notice the \s+). | ||
| 2114 | $return_type = $1; | ||
| 2115 | $declaration_name = $2; | ||
| 2116 | $noret = 1; | ||
| 2117 | } elsif ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || | ||
| 2109 | $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || | 2118 | $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || |
| 2110 | $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || | 2119 | $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || |
| 2111 | $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || | 2120 | $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || |
| @@ -2140,7 +2149,7 @@ sub dump_function($$) { | |||
| 2140 | # of warnings goes sufficiently down, the check is only performed in | 2149 | # of warnings goes sufficiently down, the check is only performed in |
| 2141 | # verbose mode. | 2150 | # verbose mode. |
| 2142 | # TODO: always perform the check. | 2151 | # TODO: always perform the check. |
| 2143 | if ($verbose) { | 2152 | if ($verbose && !$noret) { |
| 2144 | check_return_section($file, $declaration_name, $return_type); | 2153 | check_return_section($file, $declaration_name, $return_type); |
| 2145 | } | 2154 | } |
| 2146 | 2155 | ||
