Skip to content

Commit

Permalink
scripts/kernel-doc: handle DECLARE_HASHTABLE
Browse files Browse the repository at this point in the history
DECLARE_HASHTABLE needs similar handling to DECLARE_BITMAP
because otherwise kernel-doc assumes the member name is the
second, not first macro parameter.

Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Jakub Kicinski authored and Jonathan Corbet committed Jul 3, 2017
1 parent f5620df commit 1cb566b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,8 @@ sub dump_struct($$) {
$members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
# replace DECLARE_BITMAP
$members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
# replace DECLARE_HASHTABLE
$members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;

create_parameterlist($members, ';', $file);
check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);
Expand Down

0 comments on commit 1cb566b

Please sign in to comment.