qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: michael.roth@amd.com, eblake@redhat.com, kwolf@redhat.com,
	hreitz@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, arei.gonglei@huawei.com,
	pizhenwei@bytedance.com, jsnow@redhat.com,
	vsementsov@yandex-team.ru, eduardo@habkost.net,
	marcel.apfelbaum@gmail.com, wangyanan55@huawei.com,
	quintela@redhat.com, jasowang@redhat.com,
	yuval.shaia.ml@gmail.com, stefanha@redhat.com, kraxel@redhat.com,
	kkostiuk@redhat.com, qemu-block@nongnu.org,
	marcandre.lureau@gmail.com, david@redhat.com,
	Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH v2 10/16] qapi: Fix unintended definition lists in documentation
Date: Tue, 25 Apr 2023 08:42:17 +0200	[thread overview]
Message-ID: <20230425064223.820979-11-armbru@redhat.com> (raw)
In-Reply-To: <20230425064223.820979-1-armbru@redhat.com>

rST parses something like

    first line
        second line

as a definition list item, where "first line" is the term being
defined by "second line".

This bites us in a couple of places.  Here's one:

    # @bps_max: total throughput limit during bursts,
    #                     in bytes (Since 1.7)

scripts/qapi/parser.py parses this into an "argument section" with
name "bps_max" and text

    total throughput limit during bursts,
	      in bytes (Since 1.7)

docs/sphinx/qapidoc.py duly passes the text to the rST parser, which
parses it as another definition list.  Comes out as nested
definitions: term "bps_max: int (optional)" defined as term "total
throughput limit during bursts," defined as "in bytes (Since 1.7)".

rST truly is the Perl of ASCII-based markups.

Fix by deleting the extra indentation.

Fixes: 26ec4e53f2bf (qapi: Fix indent level on doc comments in json files)
Fixes: c0ac533b6f97 (qapi: Stop using whitespace for alignment in comments)
Fixes: 81ad2964e938 (net/vmnet: add vmnet backends to qapi/net)
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 qapi/block-core.json | 52 ++++++++++++++++++++++----------------------
 qapi/control.json    |  2 +-
 qapi/machine.json    |  4 ++--
 qapi/net.json        |  2 +-
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index a5a5007b28..2382772e17 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -488,41 +488,41 @@
 #
 # @image: the info of image used (since: 1.6)
 #
-# @bps_max: total throughput limit during bursts,
-#                     in bytes (Since 1.7)
+# @bps_max: total throughput limit during bursts, in bytes
+#           (Since 1.7)
 #
-# @bps_rd_max: read throughput limit during bursts,
-#                        in bytes (Since 1.7)
+# @bps_rd_max: read throughput limit during bursts, in bytes
+#              (Since 1.7)
 #
-# @bps_wr_max: write throughput limit during bursts,
-#                        in bytes (Since 1.7)
+# @bps_wr_max: write throughput limit during bursts, in bytes
+#              (Since 1.7)
 #
-# @iops_max: total I/O operations per second during bursts,
-#                      in bytes (Since 1.7)
+# @iops_max: total I/O operations per second during bursts, in bytes
+#            (Since 1.7)
 #
-# @iops_rd_max: read I/O operations per second during bursts,
-#                         in bytes (Since 1.7)
+# @iops_rd_max: read I/O operations per second during bursts, in bytes
+#               (Since 1.7)
 #
-# @iops_wr_max: write I/O operations per second during bursts,
-#                         in bytes (Since 1.7)
+# @iops_wr_max: write I/O operations per second during bursts, in
+#               bytes (Since 1.7)
 #
-# @bps_max_length: maximum length of the @bps_max burst
-#                            period, in seconds. (Since 2.6)
+# @bps_max_length: maximum length of the @bps_max burst period, in
+#                  seconds. (Since 2.6)
 #
-# @bps_rd_max_length: maximum length of the @bps_rd_max
-#                               burst period, in seconds. (Since 2.6)
+# @bps_rd_max_length: maximum length of the @bps_rd_max burst period,
+#                     in seconds. (Since 2.6)
 #
-# @bps_wr_max_length: maximum length of the @bps_wr_max
-#                               burst period, in seconds. (Since 2.6)
+# @bps_wr_max_length: maximum length of the @bps_wr_max burst period,
+#                     in seconds. (Since 2.6)
 #
-# @iops_max_length: maximum length of the @iops burst
-#                             period, in seconds. (Since 2.6)
+# @iops_max_length: maximum length of the @iops burst period, in
+#                   seconds. (Since 2.6)
 #
-# @iops_rd_max_length: maximum length of the @iops_rd_max
-#                                burst period, in seconds. (Since 2.6)
+# @iops_rd_max_length: maximum length of the @iops_rd_max burst
+#                      period, in seconds. (Since 2.6)
 #
-# @iops_wr_max_length: maximum length of the @iops_wr_max
-#                                burst period, in seconds. (Since 2.6)
+# @iops_wr_max_length: maximum length of the @iops_wr_max burst
+#                      period, in seconds. (Since 2.6)
 #
 # @iops_size: an I/O size in bytes (Since 1.7)
 #
@@ -948,7 +948,7 @@
 #                           by the device (Since 4.2)
 #
 # @invalid_rd_operations: The number of invalid read operations
-#                          performed by the device (Since 2.5)
+#                         performed by the device (Since 2.5)
 #
 # @invalid_wr_operations: The number of invalid write operations
 #                         performed by the device (Since 2.5)
@@ -3735,7 +3735,7 @@
 # Driver specific block device options for Quorum
 #
 # @blkverify: true if the driver must print content mismatch
-#                  set to false by default
+#             set to false by default
 #
 # @children: the children block devices to use
 #
diff --git a/qapi/control.json b/qapi/control.json
index afca2043af..f83499280a 100644
--- a/qapi/control.json
+++ b/qapi/control.json
@@ -195,7 +195,7 @@
 # @id: Name of the monitor
 #
 # @mode: Selects the monitor mode (default: readline in the system
-#           emulator, control in qemu-storage-daemon)
+#        emulator, control in qemu-storage-daemon)
 #
 # @pretty: Enables pretty printing (QMP only)
 #
diff --git a/qapi/machine.json b/qapi/machine.json
index 20541cb319..1a90376f4e 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -457,7 +457,7 @@
 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
 #
 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
-#         if omitted)
+#        if omitted)
 #
 # @mem: memory size of this node; mutually exclusive with @memdev.
 #       Equally divide total memory among nodes if both @mem and @memdev are
@@ -690,7 +690,7 @@
 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
 #
 # @none: None (no memory side cache in this proximity domain,
-#              or cache associativity unknown)
+#        or cache associativity unknown)
 #
 # @direct: Direct Mapped
 #
diff --git a/qapi/net.json b/qapi/net.json
index 1f1e148f01..ec66b39b70 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -533,7 +533,7 @@
 #               Must be specified along with @start-address and @subnet-mask.
 #
 # @subnet-mask: The IPv4 subnet mask to use on the interface. Must
-#                be specified along with @start-address and @subnet-mask.
+#               be specified along with @start-address and @subnet-mask.
 #
 # @isolated: Enable isolation for this interface. Interface isolation
 #            ensures that vmnet interface is not able to communicate
-- 
2.39.2



  parent reply	other threads:[~2023-04-25  6:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  6:42 [PATCH v2 00/16] qapi qga/qapi-schema: Doc fixes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 01/16] qga/qapi-schema: Tidy up documentation of guest-fsfreeze-status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 02/16] qga/qapi-schema: Fix a misspelled reference Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 03/16] qapi: Fix misspelled references Markus Armbruster
2023-04-25  7:17   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 04/16] qapi: Fix up references to long gone error classes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 05/16] qapi/block-core: Clean up after removal of dirty bitmap @status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 06/16] qapi: @foo should be used to reference, not ``foo`` Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 07/16] qapi: Tidy up examples Markus Armbruster
2023-04-25  7:20   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 08/16] qapi: Delete largely misleading "Stability Considerations" Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 09/16] qapi: Fix bullet list markup in documentation Markus Armbruster
2023-04-27 15:28   ` Markus Armbruster
2023-04-27 15:44     ` Juan Quintela
2023-04-25  6:42 ` Markus Armbruster [this message]
2023-04-25  6:42 ` [PATCH v2 11/16] qga/qapi-schema: Fix member documentation markup Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 12/16] qapi: Fix argument " Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 13/16] qapi: Replace ad hoc "since" documentation by member documentation Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 14/16] qapi: Fix misspelled section tags in doc comments Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 15/16] qapi: Format since information the conventional way: (since X.Y) Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 16/16] qapi storage-daemon/qapi: Fix documentation section structure Markus Armbruster
2023-04-27  9:53 ` [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls Markus Armbruster
2023-04-27 11:09   ` Juan Quintela
2023-04-27 12:36     ` Markus Armbruster
2023-04-27 12:41   ` Vladimir Sementsov-Ogievskiy
2023-04-27 13:47     ` Vladimir Sementsov-Ogievskiy
2023-04-28  9:34     ` Markus Armbruster
2023-04-28  9:44       ` Vladimir Sementsov-Ogievskiy
2023-04-28 10:27         ` Markus Armbruster
2023-04-27  9:53 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425064223.820979-11-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=wangyanan55@huawei.com \
    --cc=yuval.shaia.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).