Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <donald.hunter@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240326173825.99190-1-donald.hunter@gmail.com

authored by

Donald Hunter and committed by
Jonathan Corbet
0ec69b3b 42fb9cfd

+1 -1
+1 -1
scripts/kernel-doc
··· 1541 1541 save_struct_actual($2); 1542 1542 1543 1543 push_parameter($2, "$type $1", $arg, $file, $declaration_name); 1544 - } elsif ($param =~ m/(.*?):(\d+)/) { 1544 + } elsif ($param =~ m/(.*?):(\w+)/) { 1545 1545 if ($type ne "") { # skip unnamed bit-fields 1546 1546 save_struct_actual($1); 1547 1547 push_parameter($1, "$type:$2", $arg, $file, $declaration_name)