Skip to contentSkip to conversation

Fix some typos in documentation and comments

PATCH Applied Stefan Weil via 5 participants 6 messages Oct 30, 2022 – Nov 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix some typos in documentation and comments

Most of them were found and fixed using codespell.

---

v2: Fixes from Peter Maydell's comments

My focus was fixing typos which are relevant for the generated documentation.

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

Stefan

 docs/devel/testing.rst              |  2 +-
 docs/system/arm/cpu-features.rst    |  2 +-
 docs/system/loongarch/loongson3.rst |  2 +-
 docs/tools/virtiofsd.rst            |  2 +-
 include/exec/memory.h               |  2 +-
 qapi/qom.json                       |  2 +-
 qemu-options.hx                     | 10 +++++-----
 qga/qapi-schema.json                |  2 +-
 tests/qtest/libqtest.h              |  2 +-
 9 files changed, 13 insertions(+), 13 deletions(-)
docs/devel/testing.rst +1 -1
index fbb98faabe..e10c47b5a7 100644
@@ -99,7 +99,7 @@ successfully on various hosts. The following list shows some best practices:
 * If your test cases uses the blkdebug feature, use relative path to pass
   the config and image file paths in the command line as Windows absolute
   path contains the delimiter ":" which will confuse the blkdebug parser.
-* Use double quotes in your extra QEMU commmand line in your test cases
+* Use double quotes in your extra QEMU command line in your test cases
   instead of single quotes, as Windows does not drop single quotes when
   passing the command line to QEMU.
 * Windows opens a file in text mode by default, while a POSIX compliant
docs/system/arm/cpu-features.rst +1 -1
index c2c01ec7d2..00c444042f 100644
@@ -433,7 +433,7 @@ additional constraints on the set of vector lengths supported by SME.
 SME User-mode Default Vector Length Property
 --------------------------------------------
 
-For qemu-aarch64, the cpu propery ``sme-default-vector-length=N`` is
+For qemu-aarch64, the cpu property ``sme-default-vector-length=N`` is
 defined to mirror the Linux kernel parameter file
 ``/proc/sys/abi/sme_default_vector_length``.  The default length, ``N``,
 is in units of bytes and must be between 16 and 8192.
docs/system/loongarch/loongson3.rst +1 -1
index 1bdab44e27..68113b6f5e 100644
@@ -41,7 +41,7 @@ can be accessed by following steps.
 
   $ qemu-system-loongarch64 -machine virt -m 4G -cpu la464-loongarch-cpu \
       -smp 1 -bios QEMU_EFI.fd -kernel vmlinuz.efi -initrd initrd.img \
-      -append "root=/dev/ram rdinit=/sbin/init consol e=ttyS0,115200" \
+      -append "root=/dev/ram rdinit=/sbin/init console=ttyS0,115200" \
       --nographic
 
 Note: The running speed may be a little slow, as the performance of our
docs/tools/virtiofsd.rst +1 -1
index 5f5ac9dd56..995a754a7b 100644
@@ -232,7 +232,7 @@ e.g.:
 
   ``:ok:server::security.:``
 
-  will pass 'securty.' xattr's in listxattr from the server
+  will pass 'security.' xattr's in listxattr from the server
   and ignore following rules.
 
   ``:ok:all:::``
include/exec/memory.h +1 -1
index bfb1de8eea..a751c111bd 100644
@@ -1970,7 +1970,7 @@ void memory_region_clear_dirty_bitmap(MemoryRegion *mr, hwaddr start,
  * querying the same page multiple times, which is especially useful for
  * display updates where the scanlines often are not page aligned.
  *
- * The dirty bitmap region which gets copyed into the snapshot (and
+ * The dirty bitmap region which gets copied into the snapshot (and
  * cleared afterwards) can be larger than requested.  The boundaries
  * are rounded up/down so complete bitmap longs (covering 64 pages on
  * 64bit hosts) can be copied over into the bitmap snapshot.  Which
qapi/qom.json +1 -1
index 80dd419b39..216b56a4e6 100644
@@ -586,7 +586,7 @@
 #
 # @size: size of the memory region in bytes
 #
-# @x-use-canonical-path-for-ramblock-id: if true, the canoncial path is used
+# @x-use-canonical-path-for-ramblock-id: if true, the canonical path is used
 #                                        for ramblock-id. Disable this for 4.0
 #                                        machine types or older to allow
 #                                        migration with newer QEMU versions.
qemu-options.hx +5 -5
index eb38e5dc40..1141dc5e58 100644
@@ -1051,7 +1051,7 @@ SRST
     details on the external interface.
 
 ``-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val]``
-    Add a KCS IPMI interafce on the ISA bus. This also adds a
+    Add a KCS IPMI interface on the ISA bus. This also adds a
     corresponding ACPI and SMBIOS entries, if appropriate.
 
     ``bmc=id``
@@ -1071,7 +1071,7 @@ SRST
     is 0xe4 and the default interrupt is 5.
 
 ``-device pci-ipmi-kcs,bmc=id``
-    Add a KCS IPMI interafce on the PCI bus.
+    Add a KCS IPMI interface on the PCI bus.
 
     ``bmc=id``
         The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
@@ -5248,8 +5248,8 @@ SRST
         read the colo-compare git log.
 
     ``-object cryptodev-backend-builtin,id=id[,queues=queues]``
-        Creates a cryptodev backend which executes crypto opreation from
-        the QEMU cipher APIS. The id parameter is a unique ID that will
+        Creates a cryptodev backend which executes crypto operations from
+        the QEMU cipher APIs. The id parameter is a unique ID that will
         be used to reference this cryptodev backend from the
         ``virtio-crypto`` device. The queues parameter is optional,
         which specify the queue number of cryptodev backend, the default
@@ -5516,7 +5516,7 @@ SRST
                        file=/etc/qemu/vnc.allow
 
         Finally the ``/etc/qemu/vnc.allow`` file would contain the list
-        of x509 distingished names that are permitted access
+        of x509 distinguished names that are permitted access
 
         ::
 
qga/qapi-schema.json +1 -1
index 026a56f76c..796434ed34 100644
@@ -392,7 +392,7 @@
 ##
 # @guest-file-flush:
 #
-# Write file changes bufferred in userspace to disk/kernel buffers
+# Write file changes buffered in userspace to disk/kernel buffers
 #
 # @handle: filehandle returned by guest-file-open
 #
tests/qtest/libqtest.h +1 -1
index 65c040e504..1a76bae326 100644
@@ -727,7 +727,7 @@ bool qtest_has_device(const char *device);
  * qtest_qmp_device_add_qdict:
  * @qts: QTestState instance to operate on
  * @drv: Name of the device that should be added
- * @arguments: QDict with properties for the device to intialize
+ * @arguments: QDict with properties for the device to initialize
  *
  * Generic hot-plugging test via the device_add QMP command with properties
  * supplied in form of QDict. Use NULL for empty properties list.
Signature · 1 line
2.30.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Stefan Weil

Most of them were found and fixed using codespell.

Quoted 8 lines

---

v2: Fixes from Peter Maydell's comments

My focus was fixing typos which are relevant for the generated documentation.

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

Is it possible to set it up in a way that doesn't report false positives ?

Anyway, for this patch:

thanks
-- PMM

#2 lore raw

Am 30.10.22 um 12:17 schrieb Peter Maydell:

Quoted 5 lines · Stefan Weil
Quoted 2 lines

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

Is it possible to set it up in a way that doesn't report false positives ?

Yes, that's possible. codespell can be configured to ignore certain words or lines and to skip files which match a given list of globs.

See https://github.com/codespell-project/codespell for details.

Stefan

Reviewed-by on v2 1/1
#3 lore raw
In reply to Stefan Weil via
Quoted 11 lines · Stefan Weil

Most of them were found and fixed using codespell.

---

v2: Fixes from Peter Maydell's comments

My focus was fixing typos which are relevant for the generated documentation.

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

... at least for the docs/ folder, this might indeed be a good idea.

Quoted 159 lines

  docs/devel/testing.rst              |  2 +-
  docs/system/arm/cpu-features.rst    |  2 +-
  docs/system/loongarch/loongson3.rst |  2 +-
  docs/tools/virtiofsd.rst            |  2 +-
  include/exec/memory.h               |  2 +-
  qapi/qom.json                       |  2 +-
  qemu-options.hx                     | 10 +++++-----
  qga/qapi-schema.json                |  2 +-
  tests/qtest/libqtest.h              |  2 +-
  9 files changed, 13 insertions(+), 13 deletions(-)
docs/devel/testing.rst +1 -1
index fbb98faabe..e10c47b5a7 100644
@@ -99,7 +99,7 @@ successfully on various hosts. The following list shows some best practices:
  * If your test cases uses the blkdebug feature, use relative path to pass
    the config and image file paths in the command line as Windows absolute
    path contains the delimiter ":" which will confuse the blkdebug parser.
-* Use double quotes in your extra QEMU commmand line in your test cases
+* Use double quotes in your extra QEMU command line in your test cases
    instead of single quotes, as Windows does not drop single quotes when
    passing the command line to QEMU.
  * Windows opens a file in text mode by default, while a POSIX compliant
docs/system/arm/cpu-features.rst +1 -1
index c2c01ec7d2..00c444042f 100644
@@ -433,7 +433,7 @@ additional constraints on the set of vector lengths supported by SME.
  SME User-mode Default Vector Length Property
  --------------------------------------------
 
-For qemu-aarch64, the cpu propery ``sme-default-vector-length=N`` is
+For qemu-aarch64, the cpu property ``sme-default-vector-length=N`` is
  defined to mirror the Linux kernel parameter file
  ``/proc/sys/abi/sme_default_vector_length``.  The default length, ``N``,
  is in units of bytes and must be between 16 and 8192.
docs/system/loongarch/loongson3.rst +1 -1
index 1bdab44e27..68113b6f5e 100644
@@ -41,7 +41,7 @@ can be accessed by following steps.
 
    $ qemu-system-loongarch64 -machine virt -m 4G -cpu la464-loongarch-cpu \
        -smp 1 -bios QEMU_EFI.fd -kernel vmlinuz.efi -initrd initrd.img \
-      -append "root=/dev/ram rdinit=/sbin/init consol e=ttyS0,115200" \
+      -append "root=/dev/ram rdinit=/sbin/init console=ttyS0,115200" \
        --nographic
 
  Note: The running speed may be a little slow, as the performance of our
docs/tools/virtiofsd.rst +1 -1
index 5f5ac9dd56..995a754a7b 100644
@@ -232,7 +232,7 @@ e.g.:
 
    ``:ok:server::security.:``
 
-  will pass 'securty.' xattr's in listxattr from the server
+  will pass 'security.' xattr's in listxattr from the server
    and ignore following rules.
 
    ``:ok:all:::``
include/exec/memory.h +1 -1
index bfb1de8eea..a751c111bd 100644
@@ -1970,7 +1970,7 @@ void memory_region_clear_dirty_bitmap(MemoryRegion *mr, hwaddr start,
   * querying the same page multiple times, which is especially useful for
   * display updates where the scanlines often are not page aligned.
   *
- * The dirty bitmap region which gets copyed into the snapshot (and
+ * The dirty bitmap region which gets copied into the snapshot (and
   * cleared afterwards) can be larger than requested.  The boundaries
   * are rounded up/down so complete bitmap longs (covering 64 pages on
   * 64bit hosts) can be copied over into the bitmap snapshot.  Which
qapi/qom.json +1 -1
index 80dd419b39..216b56a4e6 100644
@@ -586,7 +586,7 @@
  #
  # @size: size of the memory region in bytes
  #
-# @x-use-canonical-path-for-ramblock-id: if true, the canoncial path is used
+# @x-use-canonical-path-for-ramblock-id: if true, the canonical path is used
  #                                        for ramblock-id. Disable this for 4.0
  #                                        machine types or older to allow
  #                                        migration with newer QEMU versions.
qemu-options.hx +5 -5
index eb38e5dc40..1141dc5e58 100644
@@ -1051,7 +1051,7 @@ SRST
      details on the external interface.
 
  ``-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val]``
-    Add a KCS IPMI interafce on the ISA bus. This also adds a
+    Add a KCS IPMI interface on the ISA bus. This also adds a
      corresponding ACPI and SMBIOS entries, if appropriate.
 
      ``bmc=id``
@@ -1071,7 +1071,7 @@ SRST
      is 0xe4 and the default interrupt is 5.
 
  ``-device pci-ipmi-kcs,bmc=id``
-    Add a KCS IPMI interafce on the PCI bus.
+    Add a KCS IPMI interface on the PCI bus.
 
      ``bmc=id``
          The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
@@ -5248,8 +5248,8 @@ SRST
          read the colo-compare git log.
 
      ``-object cryptodev-backend-builtin,id=id[,queues=queues]``
-        Creates a cryptodev backend which executes crypto opreation from
-        the QEMU cipher APIS. The id parameter is a unique ID that will
+        Creates a cryptodev backend which executes crypto operations from
+        the QEMU cipher APIs. The id parameter is a unique ID that will
          be used to reference this cryptodev backend from the
          ``virtio-crypto`` device. The queues parameter is optional,
          which specify the queue number of cryptodev backend, the default
@@ -5516,7 +5516,7 @@ SRST
                         file=/etc/qemu/vnc.allow
 
          Finally the ``/etc/qemu/vnc.allow`` file would contain the list
-        of x509 distingished names that are permitted access
+        of x509 distinguished names that are permitted access
 
          ::
 
qga/qapi-schema.json +1 -1
index 026a56f76c..796434ed34 100644
@@ -392,7 +392,7 @@
  ##
  # @guest-file-flush:
  #
-# Write file changes bufferred in userspace to disk/kernel buffers
+# Write file changes buffered in userspace to disk/kernel buffers
  #
  # @handle: filehandle returned by guest-file-open
  #
tests/qtest/libqtest.h +1 -1
index 65c040e504..1a76bae326 100644
@@ -727,7 +727,7 @@ bool qtest_has_device(const char *device);
   * qtest_qmp_device_add_qdict:
   * @qts: QTestState instance to operate on
   * @drv: Name of the device that should be added
- * @arguments: QDict with properties for the device to intialize
+ * @arguments: QDict with properties for the device to initialize
   *
   * Generic hot-plugging test via the device_add QMP command with properties
   * supplied in form of QDict. Use NULL for empty properties list.
#4 lore raw

Am 31.10.22 um 08:35 schrieb Thomas Huth:

Quoted 8 lines · Stefan Weil
Quoted 7 lines

Most of them were found and fixed using codespell.

---

v2: Fixes from Peter Maydell's comments

Quoted 8 lines
Quoted 4 lines

My focus was fixing typos which are relevant for the generated documentation.

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

... at least for the docs/ folder, this might indeed be a good idea.

See also "Reviewed-by: Stefan Hajnoczi <[email protected]>" for the first version of this patch.

Maybe the pull request can be made by qemu-trivial?

Thanks,

Stefan

#5 lore raw

Le 31/10/2022 à 14:22, Stefan Weil via a écrit :

Quoted 20 lines

Am 31.10.22 um 08:35 schrieb Thomas Huth:

Quoted 8 lines · Stefan Weil
Quoted 7 lines

Most of them were found and fixed using codespell.

---

v2: Fixes from Peter Maydell's comments

Quoted 8 lines
Quoted 4 lines

My focus was fixing typos which are relevant for the generated documentation.

codespell finds many more typos in source code, and adding it to the continuous integration checks looks more and more like a good idea.

... at least for the docs/ folder, this might indeed be a good idea.

Quoted 9 lines

See also "Reviewed-by: Stefan Hajnoczi <[email protected]>" for the first version of this patch.

Maybe the pull request can be made by qemu-trivial?

Thanks,

Stefan

Applied to my trivial-patches branch.

Thanks,
Laurent