diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-21 13:07:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-21 13:07:25 -0400 |
commit | 90125edbc49ec58b9101c4271bb1d87b04a4620f (patch) | |
tree | 068353d4234435b17ade687b50a5d5015bdf1ad9 /scripts | |
parent | 0a8adf584759cbcbce5d88d419db01a8d0373abf (diff) | |
parent | 9a3c4145af32125c5ee39c0272662b47307a8323 (diff) |
Merge 3.16-rc6 into driver-core-next
We want the platform changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 | ||