"Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> writes: > when generating the kerneldoc manual kernel-api.html with "make > htmldocs", the two routines in lib/crc32.c that refer to a parameter > of type "const u32 (*tab)[256]" generate kerneldoc errors: > > Warning(.//lib/crc32.c:148): No description found for parameter 'tab)[256]' > Warning(.//lib/crc32.c:148): Excess function parameter 'tab' description in 'crc32_le_generic' > Warning(.//lib/crc32.c:293): No description found for parameter 'tab)[256]' > Warning(.//lib/crc32.c:293): Excess function parameter 'tab' description in 'crc32_be_generic' > Warning(.//lib/crc32.c): no structured comments found > > kerneldoc content and declaration for one of them: > > /** > * crc32_le_generic() - Calculate bitwise little-endian Ethernet AUTODIN II > * CRC32/CRC32C > * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for other > * uses, or the previous crc32/crc32c value if computing incrementally. > * @p: pointer to buffer over which CRC32/CRC32C is run > * @len: length of buffer @p > * @tab: little-endian Ethernet table > * @polynomial: CRC32/CRC32c LE polynomial > */ > static inline u32 __pure crc32_le_generic(u32 crc, unsigned char const *p, > size_t len, const u32 (*tab)[256], > u32 polynomial) > { > > ... snip ... > > so what is it about that declaration that causes kerneldoc to choke? > and because those two routines are the only kerneldoc content in that > source file, the kernel-api page generated for that file is just a > dummy page, reporting an error. > > thoughts? Maybe the attached simple patch is good enough? Completely untested except for a single run against that file.... Bjørn
>From 3da3a4c052d534eb34b1dd91362dc0b05f232d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@xxxxxxx> Date: Tue, 3 Feb 2015 14:15:48 +0100 Subject: [PATCH] kernel-doc: support pointer-to-array params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork <bjorn@xxxxxxx> --- scripts/kernel-doc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9922e66883a5..1143f80f07ed 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1877,8 +1877,8 @@ sub create_parameterlist($$$) { # corresponding data structures "correctly". Catch it later in # output_* subs. push_parameter($arg, "", $file); - } elsif ($arg =~ m/\(.+\)\s*\(/) { - # pointer-to-function + } elsif ($arg =~ m/\(.+\)\s*(?:\(|\[)/) { + # pointer-to-function or -array $arg =~ tr/#/,/; $arg =~ m/[^\(]+\(\*?\s*(\w*)\s*\)/; $param = $1; -- 2.1.4
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies