summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-07-01 05:09:59 +0300
committerJonathan Corbet <corbet@lwn.net>2017-07-03 15:57:09 +0300
commit1cb566ba5634d7593b8b2a0a5c83f1c9e14b2e09 (patch)
tree6ee8a89fbf9c1cb4f1df3a2242d68025240b7b26 /scripts
parentf5620df7e395465f4eee6c187a4f956b7100b794 (diff)
downloadlinux-1cb566ba5634d7593b8b2a0a5c83f1c9e14b2e09.tar.xz
scripts/kernel-doc: handle DECLARE_HASHTABLE
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 <jakub.kicinski@netronome.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a26a5f2dce39..c1ffd31ff423 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -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);