diff options
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index a193fa3f5272..ed591e9b7d1d 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -1468,6 +1468,8 @@ sub dump_enum($$) { | |||
| 1468 | } | 1468 | } |
| 1469 | 1469 | ||
| 1470 | } | 1470 | } |
| 1471 | # strip kmemcheck_bitfield_{begin,end}.*; | ||
| 1472 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | ||
| 1471 | 1473 | ||
| 1472 | output_declaration($declaration_name, | 1474 | output_declaration($declaration_name, |
| 1473 | 'enum', | 1475 | 'enum', |
| @@ -1651,6 +1653,15 @@ sub push_parameter($$$) { | |||
| 1651 | } | 1653 | } |
| 1652 | } | 1654 | } |
| 1653 | 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; | ||
| 1654 | push @parameterlist, $param; | 1665 | push @parameterlist, $param; |
| 1655 | $parametertypes{$param} = $type; | 1666 | $parametertypes{$param} = $type; |
| 1656 | } | 1667 | } |
| @@ -1669,6 +1680,14 @@ sub check_sections($$$$$$) { | |||
| 1669 | $prm_clean = $prms[$px]; | 1680 | $prm_clean = $prms[$px]; |
| 1670 | $prm_clean =~ s/\[.*\]//; | 1681 | $prm_clean =~ s/\[.*\]//; |
| 1671 | $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 | |||
| 1672 | ##$prm_clean =~ s/^\**//; | 1691 | ##$prm_clean =~ s/^\**//; |
| 1673 | if ($prm_clean eq $sects[$sx]) { | 1692 | if ($prm_clean eq $sects[$sx]) { |
| 1674 | $err = 0; | 1693 | $err = 0; |
