diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-17 17:53:12 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:25 -0500 |
commit | a1b8a57a0e114571b66baf6a6b8bd1c3f1f00d83 (patch) | |
tree | 83144bd0deff45036c71757f465cdce090773676 /scripts | |
parent | e495a1b26cd2f39b2808fd644f4da15db22340b0 (diff) | |
download | qemu-a1b8a57a0e114571b66baf6a6b8bd1c3f1f00d83.zip qemu-a1b8a57a0e114571b66baf6a6b8bd1c3f1f00d83.tar.gz qemu-a1b8a57a0e114571b66baf6a6b8bd1c3f1f00d83.tar.bz2 |
scripts: kernel-doc: use :c:union when needed
Sphinx C domain code after 3.2.1 will start complaning if :c:struct
would be used for an union type:
.../Documentation/gpu/drm-kms-helpers:352: ../drivers/video/hdmi.c:851: WARNING: C 'identifier' cross-reference uses wrong tag: reference name is 'union hdmi_infoframe' but found name is 'struct hdmi_infoframe'. Full reference name is 'union hdmi_infoframe'. Full found name is 'struct hdmi_infoframe'.
So, let's address this issue too in advance, in order to
avoid future issues.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/6e4ec3eec914df62389a299797a3880ae4490f35.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-30-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 524fc62..b95bae3 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1092,7 +1092,11 @@ sub output_struct_rst(%) { print "\n\n.. c:type:: " . $name . "\n\n"; } else { my $name = $args{'struct'}; - print "\n\n.. c:struct:: " . $name . "\n\n"; + if ($args{'type'} eq 'union') { + print "\n\n.. c:union:: " . $name . "\n\n"; + } else { + print "\n\n.. c:struct:: " . $name . "\n\n"; + } } print_lineno($declaration_start_line); $lineprefix = " "; |