mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
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
This commit is contained in:
parent
42fb9cfd5b
commit
0ec69b3bed
@ -1541,7 +1541,7 @@ sub create_parameterlist($$$$) {
|
||||
save_struct_actual($2);
|
||||
|
||||
push_parameter($2, "$type $1", $arg, $file, $declaration_name);
|
||||
} elsif ($param =~ m/(.*?):(\d+)/) {
|
||||
} elsif ($param =~ m/(.*?):(\w+)/) {
|
||||
if ($type ne "") { # skip unnamed bit-fields
|
||||
save_struct_actual($1);
|
||||
push_parameter($1, "$type:$2", $arg, $file, $declaration_name)
|
||||
|
Loading…
Reference in New Issue
Block a user