diff options
author | Donald Hunter <[email protected]> | 2024-03-26 17:38:25 +0000 |
---|---|---|
committer | Jonathan Corbet <[email protected]> | 2024-03-29 08:36:27 -0600 |
commit | 0ec69b3bed23a4a5a88b4261afeee44ade709ed3 (patch) | |
tree | eb121bd6f18a20f26e33ccc80f22aa1b8d0beff7 | |
parent | 42fb9cfd5b186fe2e615564f0a1bdd424aa1b151 (diff) |
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]
-rwxr-xr-x | scripts/kernel-doc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 967f1abb0edb..cb1be22afc65 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -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) |