diff options
-rwxr-xr-x | scripts/kernel-doc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index fde6e3a22e70..ed591e9b7d1d 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1653,6 +1653,15 @@ sub push_parameter($$$) { | |||
1653 | } | 1653 | } |
1654 | } | 1654 | } |
1655 | 1655 | ||
1656 | # strip spaces from $param so that it is one continous string | ||
1657 | # on @parameterlist; | ||
1658 | # this fixes a problem where check_sections() cannot find | ||
1659 | # a parameter like "addr[6 + 2]" because it actually appears | ||
1660 | # as "addr[6", "+", "2]" on the parameter list; | ||
1661 | # but it's better to maintain the param string unchanged for output, | ||
1662 | # so just weaken the string compare in check_sections() to ignore | ||
1663 | # "[blah" in a parameter string; | ||
1664 | ###$param =~ s/\s*//g; | ||
1656 | push @parameterlist, $param; | 1665 | push @parameterlist, $param; |
1657 | $parametertypes{$param} = $type; | 1666 | $parametertypes{$param} = $type; |
1658 | } | 1667 | } |
@@ -1671,6 +1680,14 @@ sub check_sections($$$$$$) { | |||
1671 | $prm_clean = $prms[$px]; | 1680 | $prm_clean = $prms[$px]; |
1672 | $prm_clean =~ s/\[.*\]//; | 1681 | $prm_clean =~ s/\[.*\]//; |
1673 | $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//; | 1682 | $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//; |
1683 | # ignore array size in a parameter string; | ||
1684 | # however, the original param string may contain | ||
1685 | # spaces, e.g.: addr[6 + 2] | ||
1686 | # and this appears in @prms as "addr[6" since the | ||
1687 | # parameter list is split at spaces; | ||
1688 | # hence just ignore "[..." for the sections check; | ||
1689 | $prm_clean =~ s/\[.*//; | ||
1690 | |||
1674 | ##$prm_clean =~ s/^\**//; | 1691 | ##$prm_clean =~ s/^\**//; |
1675 | if ($prm_clean eq $sects[$sx]) { | 1692 | if ($prm_clean eq $sects[$sx]) { |
1676 | $err = 0; | 1693 | $err = 0; |