qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] bdd2d4: qapi: Fix build_params() for empty pa


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] bdd2d4: qapi: Fix build_params() for empty parameter list
Date: Mon, 24 Sep 2018 03:42:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: bdd2d42b890b3a908fa3fbdc9661541e1b57eb15
      
https://github.com/qemu/qemu/commit/bdd2d42b890b3a908fa3fbdc9661541e1b57eb15
  Author: Markus Armbruster <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Fix build_params() for empty parameter list

build_params() returns '' instead of 'void' when there are no
parameters.  Can't happen now, but the next commit will change that.

Signed-off-by: Markus Armbruster <address@hidden>
[peterx: compose the patch from email replies]
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>


  Commit: 3ab72385b21d8d66df3f5fea42097ce264dc9d6b
      
https://github.com/qemu/qemu/commit/3ab72385b21d8d66df3f5fea42097ce264dc9d6b
  Author: Peter Xu <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M block/block-backend.c
    M block/qcow2.c
    M block/quorum.c
    M block/write-threshold.c
    M blockjob.c
    M cpus.c
    M docs/devel/qapi-code-gen.txt
    M dump.c
    M hw/acpi/core.c
    M hw/acpi/cpu.c
    M hw/acpi/memory_hotplug.c
    M hw/char/virtio-console.c
    M hw/core/qdev.c
    M hw/net/virtio-net.c
    M hw/ppc/spapr_rtc.c
    M hw/timer/mc146818rtc.c
    M hw/virtio/virtio-balloon.c
    M hw/watchdog/watchdog.c
    M include/qapi/qmp-event.h
    M job.c
    M migration/migration.c
    M migration/ram.c
    M monitor.c
    M scripts/qapi/events.py
    M scsi/pr-manager-helper.c
    M tests/test-qmp-event.c
    M ui/spice-core.c
    M ui/vnc.c
    M vl.c

  Log Message:
  -----------
  qapi: Drop qapi_event_send_FOO()'s Error ** argument

The generated qapi_event_send_FOO() take an Error ** argument.  They
can't actually fail, because all they do with the argument is passing it
to functions that can't fail: the QObject output visitor, and the
@qmp_emit callback, which is either monitor_qapi_event_queue() or
event_test_emit().

Drop the argument, and pass &error_abort to the QObject output visitor
and @qmp_emit instead.

Suggested-by: Eric Blake <address@hidden>
Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[Commit message rewritten, update to qapi-code-gen.txt corrected]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 5f1450f5444b42cde4b1edc61ea5fdcd57404d3e
      
https://github.com/qemu/qemu/commit/5f1450f5444b42cde4b1edc61ea5fdcd57404d3e
  Author: Markus Armbruster <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Emit a blank line before dummy declaration

We emit a dummy variable in each .c file "to shut up OSX toolchain
warnings about empty .o files" (commit 252dc3105fc).  Separate it from
the code preceding it (if any) with a blank line.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 913b5e28a174a1c94c8ed0be41d9bbff61034a50
      
https://github.com/qemu/qemu/commit/913b5e28a174a1c94c8ed0be41d9bbff61034a50
  Author: Markus Armbruster <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  qapi: Update docs for generator changes since commit 9ee86b85267

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 1aa806ccf01e1e7d2e3c4639629f61b0ab3f8ec5
      
https://github.com/qemu/qemu/commit/1aa806ccf01e1e7d2e3c4639629f61b0ab3f8ec5
  Author: Eric Blake <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi: Minor introspect.py cleanups

Commit 7d0f982b changed generated introspection output to no longer
produce long lines in the generated .c file, but failed to adjust
comments to match.  Add some clarity that the shorter length that
matters most is the overall QMP response on the wire.

Commit 25b1ef31 triggers a pep8 formatting nit.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 8c643361eeba94b7b831ad95b70969d962034345
      
https://github.com/qemu/qemu/commit/8c643361eeba94b7b831ad95b70969d962034345
  Author: Eric Blake <address@hidden>
  Date:   2018-08-28 (Tue, 28 Aug 2018)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi: Add comments to aid debugging generated introspection

We consciously chose in commit 1a9a507b to hide QAPI type names
from the introspection output on the wire, but added a command
line option -u to unmask the type name when doing a debug build.
The unmask option still remains useful to some other forms of
automated analysis, so it will not be removed; however, when it
is not in use, the generated .c file can be hard to read.  At
the time when we first introduced masking, the generated file
consisted only of a monolithic C string, so there was no clean
way to inject any comments.

Later, in commit 7d0f982b, we switched the generation to output
a QLit object, in part to make it easier for future addition of
conditional compilation.  In fact, commit d626b6c1 took advantage
of this by passing a tuple instead of a bare object for encoding
the output of conditionals.  By extending that tuple, we can now
interject strategic comments.

For now, type name debug aid comments are only output once per
meta-type, rather than at all uses of the number used to encode
the type within the introspection data.  But this is still a lot
more convenient than having to regenerate the file with the
unmask operation temporarily turned on - merely search the
generated file for '"NNN" =' to learn the corresponding source
name and associated definition of type NNN.

The generated qapi-introspect.c changes only with the addition
of comments, such as:

| @@ -14755,6 +15240,7 @@
|          { "name", QLIT_QSTR("[485]"), },
|          {}
|      })),
| +    /* "485" = QCryptoBlockInfoLUKSSlot */
|      QLIT_QDICT(((QLitDictEntry[]) {
|          { "members", QLIT_QLIST(((QLitObject[]) {
|              QLIT_QDICT(((QLitDictEntry[]) {

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[Rebased, update to qapi-code-gen.txt corrected]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 850a8242a5303ceddff5d6700ee9d15307bf1b9f
      
https://github.com/qemu/qemu/commit/850a8242a5303ceddff5d6700ee9d15307bf1b9f
  Author: Peter Maydell <address@hidden>
  Date:   2018-09-24 (Mon, 24 Sep 2018)

  Changed paths:
    M block/block-backend.c
    M block/qcow2.c
    M block/quorum.c
    M block/write-threshold.c
    M blockjob.c
    M cpus.c
    M docs/devel/qapi-code-gen.txt
    M dump.c
    M hw/acpi/core.c
    M hw/acpi/cpu.c
    M hw/acpi/memory_hotplug.c
    M hw/char/virtio-console.c
    M hw/core/qdev.c
    M hw/net/virtio-net.c
    M hw/ppc/spapr_rtc.c
    M hw/timer/mc146818rtc.c
    M hw/virtio/virtio-balloon.c
    M hw/watchdog/watchdog.c
    M include/qapi/qmp-event.h
    M job.c
    M migration/migration.c
    M migration/ram.c
    M monitor.c
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M scripts/qapi/introspect.py
    M scsi/pr-manager-helper.c
    M tests/test-qmp-event.c
    M ui/spice-core.c
    M ui/vnc.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-08-28' into 
staging

QAPI patches for 2018-08-28

# gpg: Signature made Tue 28 Aug 2018 17:23:32 BST
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2018-08-28:
  qapi: Add comments to aid debugging generated introspection
  qapi: Minor introspect.py cleanups
  qapi: Update docs for generator changes since commit 9ee86b85267
  qapi: Emit a blank line before dummy declaration
  qapi: Drop qapi_event_send_FOO()'s Error ** argument
  qapi: Fix build_params() for empty parameter list

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/19b599f7664b...850a8242a530
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]