* [PATCH] docs: ignore __counted_by attribute in structure definitions
@ 2023-12-19 0:20 Jonathan Corbet
0 siblings, 0 replies; only message in thread
From: Jonathan Corbet @ 2023-12-19 0:20 UTC (permalink / raw)
To: linux-doc; +Cc: linux-kernel
kernel-doc appeared to ignore __counted_by, but appearances can be
deceiving; it caused member names to not be recognized, which manifested as
a number of spurious "Excess struct member" warnings. Filter that
attribute out and reduce the warning onslaught slightly.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
scripts/kernel-doc | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index df158c3a9abc..6acc39c56ac3 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1143,6 +1143,7 @@ sub dump_struct($$) {
# strip attributes
$members =~ s/\s*$attribute/ /gi;
$members =~ s/\s*__aligned\s*\([^;]*\)/ /gos;
+ $members =~ s/\s*__counted_by\s*\([^;]*\)/ /gos;
$members =~ s/\s*__packed\s*/ /gos;
$members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
$members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-19 0:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 0:20 [PATCH] docs: ignore __counted_by attribute in structure definitions Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®