From: Jakub Kicinski Date: Sat, 1 Jul 2017 02:09:59 +0000 (-0700) Subject: scripts/kernel-doc: handle DECLARE_HASHTABLE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cb566ba5634d7593b8b2a0a5c83f1c9e14b2e09;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jonathan Corbet --- 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);