diff options
author | Pavan Kumar Linga <pavan.kumar.linga@intel.com> | 2023-08-15 14:04:16 -0700 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2023-08-18 11:14:08 -0600 |
commit | be98edcb664be76cd3ba0bde1e760a31197176d8 (patch) | |
tree | 7a19d71aea511388703579829d42e47960a5fb65 /scripts | |
parent | 180bb41d61b7f14fff5a73d703531540ed71fba7 (diff) |
scripts: kernel-doc: parse DEFINE_DMA_UNMAP_[ADDR|LEN]
At present, if the macros DEFINE_DMA_UNMAP_ADDR() and
DEFINE_DMA_UNMAP_LEN() are used in the structures as shown
below, instead of parsing the parameter in the parentheses,
kernel-doc parses 'DEFINE_DMA_UNMAP_ADDR(' and
'DEFINE_DMA_UNMAP_LEN(' which results in the following
warnings:
drivers/net/ethernet/intel/idpf/idpf_txrx.h:201: warning: Function
parameter or member 'DEFINE_DMA_UNMAP_ADDR(dma' not described in
'idpf_tx_buf'
drivers/net/ethernet/intel/idpf/idpf_txrx.h:201: warning: Function
parameter or member 'DEFINE_DMA_UNMAP_LEN(len' not described in
'idpf_tx_buf'
struct idpf_tx_buf {
DEFINE_DMA_UNMAP_ADDR(dma);
DEFINE_DMA_UNMAP_LEN(len);
};
Fix the warnings by parsing DEFINE_DMA_UNMAP_ADDR() and
DEFINE_DMA_UNMAP_LEN().
Cc: Jonathan Corbet <corbet@lwn.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20230815210417.98749-2-pavan.kumar.linga@intel.com
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index d0116c6939dc..cfb1cb223508 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1168,6 +1168,10 @@ sub dump_struct($$) { $members =~ s/DECLARE_KFIFO_PTR\s*\($args,\s*$args\)/$2 \*$1/gos; # replace DECLARE_FLEX_ARRAY $members =~ s/(?:__)?DECLARE_FLEX_ARRAY\s*\($args,\s*$args\)/$1 $2\[\]/gos; + #replace DEFINE_DMA_UNMAP_ADDR + $members =~ s/DEFINE_DMA_UNMAP_ADDR\s*\($args\)/dma_addr_t $1/gos; + #replace DEFINE_DMA_UNMAP_LEN + $members =~ s/DEFINE_DMA_UNMAP_LEN\s*\($args\)/__u32 $1/gos; my $declaration = $members; # Split nested struct/union elements as newer ones |