Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265062
| From | conchur@web.de |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] kernel-doc: Strip #ifdef/#endif in enums |
| Date | 2015-11-08 10:50 +0100 |
| Message-ID | <qsuLL-6QE-9@gated-at.bofh.it> (permalink) |
| References | <qsuLL-6QE-11@gated-at.bofh.it> <qsuLL-6QE-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Conchúr Navid <conchur@web.de>
Some documented structures in the kernel use DECLARE_BITMAP to create
arrays of unsigned longs to store information using the bitmap functions.
These have to be replaced with a parsable version for kernel-doc.
For example a simple input like
/**
* struct something - some test
* @members: active members
*/
struct something {
DECLARE_BITMAP(members, MAX_MEMBERS);
};
resulted in parsing warnings like
warning: No description found for parameter 'MAX_MEMBERS)'
warning: Excess struct/union/enum/typedef member 'members' description in 'something'
Signed-off-by: Conchúr Navid <conchur@web.de>
---
scripts/kernel-doc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index f5c2971..9015b18 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1816,6 +1816,8 @@ sub dump_struct($$) {
$members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
$members =~ s/__aligned\s*\([^;]*\)//gos;
$members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
+ # replace DECLARE_BITMAP
+ $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
create_parameterlist($members, ';', $file);
check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
kernel-doc: Fix stripping of #define in enums conchur@web.de - 2015-11-08 10:50 +0100
[PATCH 2/3] kernel-doc: Strip #ifdef/#endif in enums conchur@web.de - 2015-11-08 10:50 +0100
[PATCH 3/3] kernel-doc: Strip #ifdef/#endif in enums conchur@web.de - 2015-11-08 10:50 +0100
[PATCHv2 3/3] kernel-doc: Fix parsing of DECLARE_BITMAP in struct conchur@web.de - 2015-11-08 11:00 +0100
csiph-web