Skip to content

Commit 0ec69b3

Browse files
donaldhJonathan Corbet
authored andcommitted
docs: Fix bitfield handling in kernel-doc
kernel-doc doesn't handle bitfields that are specified with symbolic name, e.g. u32 cs_index_mask : SPI_CS_CNT_MAX This results in the following warnings when running `make htmldocs`: include/linux/spi/spi.h:246: warning: Function parameter or struct member 'cs_index_mask:SPI_CS_CNT_MAX' not described in 'spi_device' include/linux/spi/spi.h:246: warning: Excess struct member 'cs_index_mask' description in 'spi_device' Update the regexp for bitfields to accept all word chars, not just digits. Signed-off-by: Donald Hunter <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 42fb9cf commit 0ec69b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kernel-doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ sub create_parameterlist($$$$) {
15411541
save_struct_actual($2);
15421542

15431543
push_parameter($2, "$type $1", $arg, $file, $declaration_name);
1544-
} elsif ($param =~ m/(.*?):(\d+)/) {
1544+
} elsif ($param =~ m/(.*?):(\w+)/) {
15451545
if ($type ne "") { # skip unnamed bit-fields
15461546
save_struct_actual($1);
15471547
push_parameter($1, "$type:$2", $arg, $file, $declaration_name)

0 commit comments

Comments
 (0)