All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/16] Trivial branch patches
@ 2019-06-06 11:06 Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 01/16] hw/rdma: Delete unused headers inclusion Laurent Vivier
                   ` (16 more replies)
  0 siblings, 17 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

The following changes since commit 47fbad45d47af8af784bb12a5719489edcd89b4c:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-06-04 17:22:42 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/trivial-branch-pull-request

for you to fetch changes up to f1114d321246f9177072923e1c2a20e7aab82700:

  hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev (2019-06-06 11:55:04 +0200)

----------------------------------------------------------------
Trivial fixes 06/06/2019

----------------------------------------------------------------

Jie Wang (1):
  vhost: fix incorrect print type

Li Qiang (1):
  migration: fix a typo

Markus Armbruster (1):
  test: Fix make target check-report.tap

Philippe Mathieu-Daudé (11):
  docs/devel/build-system: Update an example
  hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
  hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus
  hw/s390x/event-facility: Use the QOM BUS() macro to access
    BusState.qbus
  hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev
  hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev
  hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev
  hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev
  hw/sd: Use the QOM BUS() macro to access BusState.qbus
  hw/scsi: Use the QOM BUS() macro to access BusState.qbus
  hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access
    DeviceState.qdev

Richard Henderson (1):
  util: Adjust qemu_guest_getrandom_nofail for Coverity

Yuval Shaia (1):
  hw/rdma: Delete unused headers inclusion

 docs/devel/build-system.txt | 19 +++++++------------
 hw/audio/ac97.c             |  2 +-
 hw/isa/lpc_ich9.c           |  2 +-
 hw/isa/vt82c686.c           |  2 +-
 hw/pci/pci_bridge.c         |  2 +-
 hw/rdma/rdma_backend.c      |  7 -------
 hw/s390x/event-facility.c   |  4 ++--
 hw/scsi/lsi53c895a.c        |  2 +-
 hw/scsi/mptsas.c            |  4 ++--
 hw/scsi/virtio-scsi.c       |  2 +-
 hw/scsi/vmw_pvscsi.c        |  4 ++--
 hw/sd/milkymist-memcard.c   |  2 +-
 hw/sd/ssi-sd.c              |  2 +-
 hw/usb/dev-storage.c        |  2 +-
 hw/vfio/pci.c               |  4 ++--
 hw/virtio/vhost.c           |  2 +-
 hw/watchdog/wdt_i6300esb.c  |  2 +-
 migration/ram.c             |  2 +-
 tests/Makefile.include      |  2 +-
 util/guest-random.c         |  2 +-
 20 files changed, 29 insertions(+), 41 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 01/16] hw/rdma: Delete unused headers inclusion
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 02/16] migration: fix a typo Laurent Vivier
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Kamal Heib, Laurent Vivier,
	qemu-trivial, Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Yuval Shaia <yuval.shaia@oracle.com>

This is a trivial cleanup patch.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Kamal Heib <kheib@redhat.com>
Message-Id: <20190505105112.22691-1-yuval.shaia@oracle.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/rdma/rdma_backend.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index cf34874e9d2f..c39051068d1e 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -14,16 +14,9 @@
  */
 
 #include "qemu/osdep.h"
-#include "sysemu/sysemu.h"
-#include "qapi/error.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qnum.h"
 #include "qapi/qapi-events-rdma.h"
 
 #include <infiniband/verbs.h>
-#include <infiniband/umad_types.h>
-#include <infiniband/umad.h>
-#include <rdma/rdma_user_cm.h>
 
 #include "contrib/rdmacm-mux/rdmacm-mux.h"
 #include "trace.h"
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 02/16] migration: fix a typo
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 01/16] hw/rdma: Delete unused headers inclusion Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 03/16] vhost: fix incorrect print type Laurent Vivier
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Li Qiang, Halil Pasic, Christian Borntraeger,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Alex Bennée, Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Li Qiang <liq3ea@163.com>

'postocpy' should be 'postcopy'.

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20190525062832.18009-1-liq3ea@163.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/ram.c b/migration/ram.c
index 4c608692262e..359dc8f1bc44 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2236,7 +2236,7 @@ static RAMBlock *unqueue_page(RAMState *rs, ram_addr_t *offset)
 }
 
 /**
- * get_queued_page: unqueue a page from the postocpy requests
+ * get_queued_page: unqueue a page from the postcopy requests
  *
  * Skips pages that are already sent (!dirty)
  *
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 03/16] vhost: fix incorrect print type
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 01/16] hw/rdma: Delete unused headers inclusion Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 02/16] migration: fix a typo Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 04/16] util: Adjust qemu_guest_getrandom_nofail for Coverity Laurent Vivier
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Jie Wang, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Jie Wang <wangjie88@huawei.com>

fix incorrect print type in vhost_virtqueue_stop

Signed-off-by: Jie Wang <wangjie88@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1556605773-42019-1-git-send-email-wangjie88@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/virtio/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 7f61018f2a3f..286bb27c6539 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1081,7 +1081,7 @@ static void vhost_virtqueue_stop(struct vhost_dev *dev,
 
     r = dev->vhost_ops->vhost_get_vring_base(dev, &state);
     if (r < 0) {
-        VHOST_OPS_DEBUG("vhost VQ %d ring restore failed: %d", idx, r);
+        VHOST_OPS_DEBUG("vhost VQ %u ring restore failed: %d", idx, r);
         /* Connection to the backend is broken, so let's sync internal
          * last avail idx to the device used idx.
          */
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 04/16] util: Adjust qemu_guest_getrandom_nofail for Coverity
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 03/16] vhost: fix incorrect print type Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 05/16] test: Fix make target check-report.tap Laurent Vivier
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Richard Henderson, Dr. David Alan Gilbert, Yuval Shaia,
	Alex Williamson, Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Richard Henderson <richard.henderson@linaro.org>

Explicitly ignore the return value of qemu_guest_getrandom.
Because we use error_fatal, all errors are already caught.

Fixes: CID 1401701
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190530173824.30699-1-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 util/guest-random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/guest-random.c b/util/guest-random.c
index e8124a3cad48..00a08fd9819c 100644
--- a/util/guest-random.c
+++ b/util/guest-random.c
@@ -56,7 +56,7 @@ int qemu_guest_getrandom(void *buf, size_t len, Error **errp)
 
 void qemu_guest_getrandom_nofail(void *buf, size_t len)
 {
-    qemu_guest_getrandom(buf, len, &error_fatal);
+    (void)qemu_guest_getrandom(buf, len, &error_fatal);
 }
 
 uint64_t qemu_guest_random_seed_thread_part1(void)
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 05/16] test: Fix make target check-report.tap
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 04/16] util: Adjust qemu_guest_getrandom_nofail for Coverity Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 06/16] docs/devel/build-system: Update an example Laurent Vivier
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Markus Armbruster, Halil Pasic,
	Christian Borntraeger, Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Markus Armbruster <armbru@redhat.com>

Fix a fat-fingered invocation of tap-merge.pl in the recipe of target
check-report.tap.

Fixes: 9df43317b82 "test: replace gtester with a TAP driver"
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190604080010.23186-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 46a36c2c9527..34df040583dc 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -904,7 +904,7 @@ check-report-unit.tap: $(check-unit-y)
 # Reports and overall runs
 
 check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap
-	$(call quiet-command,./scripts/tap-merge.py $^ > $@,"GEN","$@")
+	$(call quiet-command, cat $^ | scripts/tap-merge.pl >$@,"GEN","$@")
 
 # FPU Emulation tests (aka softfloat)
 #
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 06/16] docs/devel/build-system: Update an example
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 05/16] test: Fix make target check-report.tap Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 07/16] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly Laurent Vivier
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Thomas Huth, Dr. David Alan Gilbert, Yuval Shaia,
	Alex Williamson, Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

The default-configs/ example added in 717171bd2025 is no
more accurate since fa212a2b8b60 (and various further other
commits).

The Kconfig build system is now in place.
Use the aarch64-softmmu config as example.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190529140504.21580-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 docs/devel/build-system.txt | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt
index addd274eebd9..41bd08ea3ab3 100644
--- a/docs/devel/build-system.txt
+++ b/docs/devel/build-system.txt
@@ -413,18 +413,13 @@ context.
 - default-configs/*.mak
 
 The files under default-configs/ control what emulated hardware is built
-into each QEMU system and userspace emulator targets. They merely
-contain a long list of config variable definitions. For example,
-default-configs/x86_64-softmmu.mak has:
-
-  include sound.mak
-  include usb.mak
-  CONFIG_QXL=$(CONFIG_SPICE)
-  CONFIG_VGA_ISA=y
-  CONFIG_VGA_CIRRUS=y
-  CONFIG_VMWARE_VGA=y
-  CONFIG_VIRTIO_VGA=y
-  ...snip...
+into each QEMU system and userspace emulator targets. They merely contain
+a list of config variable definitions like the machines that should be
+included. For example, default-configs/aarch64-softmmu.mak has:
+
+  include arm-softmmu.mak
+  CONFIG_XLNX_ZYNQMP_ARM=y
+  CONFIG_XLNX_VERSAL=y
 
 These files rarely need changing unless new devices / hardware need to
 be enabled for a particular system/userspace emulation target
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 07/16] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 06/16] docs/devel/build-system: Update an example Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 08/16] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since the BusState is accesible from the SCSIBus object,
it is pointless to use qbus_reset_all_fn.
Use qbus_reset_all() directly.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Message-Id: <20190528164020.32250-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/scsi/vmw_pvscsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index 584b4be07e79..c39e33fa3599 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -440,7 +440,7 @@ static void
 pvscsi_reset_adapter(PVSCSIState *s)
 {
     s->resetting++;
-    qbus_reset_all_fn(&s->bus);
+    qbus_reset_all(BUS(&s->bus));
     s->resetting--;
     pvscsi_process_completion_queue(s);
     assert(QTAILQ_EMPTY(&s->pending_queue));
@@ -848,7 +848,7 @@ pvscsi_on_cmd_reset_bus(PVSCSIState *s)
     trace_pvscsi_on_cmd_arrived("PVSCSI_CMD_RESET_BUS");
 
     s->resetting++;
-    qbus_reset_all_fn(&s->bus);
+    qbus_reset_all(BUS(&s->bus));
     s->resetting--;
     return PVSCSI_COMMAND_PROCESSING_SUCCEEDED;
 }
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 08/16] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 07/16] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: " Laurent Vivier
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a BusState with "s->bus.qbus",
use the QOM prefered style: "BUS(&s->bus)".

This patch was generated using the following Coccinelle script:

    // Use BUS() macros to access BusState.qbus
    @use_bus_macro_to_access_qbus@
    expression obj;
    identifier bus;
    @@
    -&obj->bus.qbus
    +BUS(&obj->bus)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20190528164020.32250-4-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/pci/pci_bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index c6d9ded3203c..8d954885c0a1 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -273,7 +273,7 @@ void pci_bridge_write_config(PCIDevice *d,
     newctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
     if (~oldctl & newctl & PCI_BRIDGE_CTL_BUS_RESET) {
         /* Trigger hot reset on 0->1 transition. */
-        qbus_reset_all(&s->sec_bus.qbus);
+        qbus_reset_all(BUS(&s->sec_bus));
     }
 }
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 08/16] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 12:11   ` David Hildenbrand
  2019-06-06 11:06 ` [Qemu-devel] [PULL 10/16] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev Laurent Vivier
                   ` (7 subsequent siblings)
  16 siblings, 1 reply; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a BusState with "s->bus.qbus",
use the QOM prefered style: "BUS(&s->bus)".

This patch was generated using the following Coccinelle script:

    // Use BUS() macros to access BusState.qbus
    @use_bus_macro_to_access_qbus@
    expression obj;
    identifier bus;
    @@
    -&obj->bus.qbus
    +BUS(&obj->bus)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20190528164020.32250-5-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index ee5b83448b11..e574223a226b 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -466,12 +466,12 @@ static void init_event_facility(Object *obj)
     new = object_new(TYPE_SCLP_QUIESCE);
     object_property_add_child(obj, TYPE_SCLP_QUIESCE, new, NULL);
     object_unref(new);
-    qdev_set_parent_bus(DEVICE(new), &event_facility->sbus.qbus);
+    qdev_set_parent_bus(DEVICE(new), BUS(&event_facility->sbus));
 
     new = object_new(TYPE_SCLP_CPU_HOTPLUG);
     object_property_add_child(obj, TYPE_SCLP_CPU_HOTPLUG, new, NULL);
     object_unref(new);
-    qdev_set_parent_bus(DEVICE(new), &event_facility->sbus.qbus);
+    qdev_set_parent_bus(DEVICE(new), BUS(&event_facility->sbus));
     /* the facility will automatically realize the devices via the bus */
 }
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 10/16] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: " Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 11/16] hw/usb-storage: " Laurent Vivier
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a DeviceState with
"s->qdev", use the QOM prefered style: "DEVICE(s)".

This patch was generated using the following Coccinelle script:

    // Use DEVICE() macros to access DeviceState.qdev
    @use_device_macro_to_access_qdev@
    expression obj;
    identifier dev;
    @@
    -&obj->dev.qdev
    +DEVICE(obj)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20190528164020.32250-8-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/isa/lpc_ich9.c | 2 +-
 hw/isa/vt82c686.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 031ee9cd933d..35d17246e940 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -412,7 +412,7 @@ void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled)
                                  true);
     }
 
-    ich9_lpc_reset(&lpc->d.qdev);
+    ich9_lpc_reset(DEVICE(lpc));
 }
 
 /* APM */
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 85d0532dd5b5..d46754f61cfb 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -369,7 +369,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp)
     pci_conf[0x90] = s->smb_io_base | 1;
     pci_conf[0x91] = s->smb_io_base >> 8;
     pci_conf[0xd2] = 0x90;
-    pm_smbus_init(&s->dev.qdev, &s->smb, false);
+    pm_smbus_init(DEVICE(s), &s->smb, false);
     memory_region_add_subregion(get_system_io(), s->smb_io_base, &s->smb.io);
 
     apm_init(dev, &s->apm, NULL, s);
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 11/16] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 10/16] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 12/16] hw/vfio/pci: " Laurent Vivier
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a DeviceState with
"s->qdev", use the QOM prefered style: "DEVICE(s)".

This patch was generated using the following Coccinelle script:

    // Use DEVICE() macros to access DeviceState.qdev
    @use_device_macro_to_access_qdev@
    expression obj;
    identifier dev;
    @@
    -&obj->dev.qdev
    +DEVICE(obj)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20190528164020.32250-9-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/usb/dev-storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index cd5551d94f35..0e4e93ef1673 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -616,7 +616,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
      * The hack is probably a bad idea.
      */
     blk_ref(blk);
-    blk_detach_dev(blk, &s->dev.qdev);
+    blk_detach_dev(blk, DEVICE(s));
     s->conf.blk = NULL;
 
     usb_desc_create_serial(dev);
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 12/16] hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (10 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 11/16] hw/usb-storage: " Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 13/16] hw/audio/ac97: " Laurent Vivier
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a DeviceState with
"s->qdev", use the QOM prefered style: "DEVICE(s)".

This patch was generated using the following Coccinelle script:

    // Use DEVICE() macros to access DeviceState.qdev
    @use_device_macro_to_access_qdev@
    expression obj;
    identifier dev;
    @@
    -&obj->dev.qdev
    +DEVICE(obj)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Message-Id: <20190528164020.32250-10-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/vfio/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 8e555db12ec0..2a4091d216e2 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2717,7 +2717,7 @@ static void vfio_req_notifier_handler(void *opaque)
         return;
     }
 
-    qdev_unplug(&vdev->pdev.qdev, &err);
+    qdev_unplug(DEVICE(vdev), &err);
     if (err) {
         warn_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name);
     }
@@ -2839,7 +2839,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
     vdev->vbasedev.name = g_path_get_basename(vdev->vbasedev.sysfsdev);
     vdev->vbasedev.ops = &vfio_pci_ops;
     vdev->vbasedev.type = VFIO_DEVICE_TYPE_PCI;
-    vdev->vbasedev.dev = &vdev->pdev.qdev;
+    vdev->vbasedev.dev = DEVICE(vdev);
 
     tmp = g_strdup_printf("%s/iommu_group", vdev->vbasedev.sysfsdev);
     len = readlink(tmp, group_path, sizeof(group_path));
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 13/16] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (11 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 12/16] hw/vfio/pci: " Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 14/16] hw/sd: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a DeviceState with
"s->qdev", use the QOM prefered style: "DEVICE(s)".

This patch was generated using the following Coccinelle script
(with a bit of manual fix-up, removing an extra space to please
checkpatch.pl):

    // Use DEVICE() macros to access DeviceState.qdev
    @use_device_macro_to_access_qdev@
    expression obj;
    identifier dev;
    @@
    -&obj->dev.qdev
    +DEVICE(obj)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>.
Message-Id: <20190528164020.32250-7-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/audio/ac97.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 2265622d44a2..a4e8d99e7775 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1388,7 +1388,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp)
     pci_register_bar (&s->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nam);
     pci_register_bar (&s->dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nabm);
     AUD_register_card ("ac97", &s->card);
-    ac97_on_reset (&s->dev.qdev);
+    ac97_on_reset(DEVICE(s));
 }
 
 static void ac97_exit(PCIDevice *dev)
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 14/16] hw/sd: Use the QOM BUS() macro to access BusState.qbus
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (12 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 13/16] hw/audio/ac97: " Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 15/16] hw/scsi: " Laurent Vivier
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a BusState with "s->bus.qbus",
use the QOM prefered style: "BUS(&s->bus)".

This patch was generated using the following Coccinelle script:

    // Use BUS() macros to access BusState.qbus
    @use_bus_macro_to_access_qbus@
    expression obj;
    identifier bus;
    @@
    -&obj->bus.qbus
    +BUS(&obj->bus)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20190528164020.32250-6-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/sd/milkymist-memcard.c | 2 +-
 hw/sd/ssi-sd.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index df42aa1c545b..dd1ba649d9c0 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -277,7 +277,7 @@ static void milkymist_memcard_realize(DeviceState *dev, Error **errp)
     /* FIXME use a qdev drive property instead of drive_get_next() */
     dinfo = drive_get_next(IF_SD);
     blk = dinfo ? blk_by_legacy_dinfo(dinfo) : NULL;
-    carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
+    carddev = qdev_create(BUS(&s->sdbus), TYPE_SD_CARD);
     qdev_prop_set_drive(carddev, "drive", blk, &err);
     object_property_set_bool(OBJECT(carddev), true, "realized", &err);
     if (err) {
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index 623d0333e863..25e1009277ed 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -249,7 +249,7 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)
     /* Create and plug in the sd card */
     /* FIXME use a qdev drive property instead of drive_get_next() */
     dinfo = drive_get_next(IF_SD);
-    carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
+    carddev = qdev_create(BUS(&s->sdbus), TYPE_SD_CARD);
     if (dinfo) {
         qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), &err);
     }
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 15/16] hw/scsi: Use the QOM BUS() macro to access BusState.qbus
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (13 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 14/16] hw/sd: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 11:06 ` [Qemu-devel] [PULL 16/16] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev Laurent Vivier
  2019-06-06 14:04 ` [Qemu-devel] [PULL 00/16] Trivial branch patches Peter Maydell
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a BusState with "s->bus.qbus",
use the QOM prefered style: "BUS(&s->bus)".

This patch was generated using the following Coccinelle script:

    // Use BUS() macros to access BusState.qbus
    @use_bus_macro_to_access_qbus@
    expression obj;
    identifier bus;
    @@
    -&obj->bus.qbus
    +BUS(&obj->bus)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190528164020.32250-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/scsi/lsi53c895a.c  | 2 +-
 hw/scsi/mptsas.c      | 4 ++--
 hw/scsi/virtio-scsi.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index da7239d94fcd..a8b7a199f960 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -1860,7 +1860,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
         }
         if (val & LSI_SCNTL1_RST) {
             if (!(s->sstat0 & LSI_SSTAT0_RST)) {
-                qbus_reset_all(&s->bus.qbus);
+                qbus_reset_all(BUS(&s->bus));
                 s->sstat0 |= LSI_SSTAT0_RST;
                 lsi_script_scsi_interrupt(s, LSI_SIST0_RST, 0);
             }
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 929404fb48c8..e800683e91e9 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -540,7 +540,7 @@ reply_maybe_async:
         break;
 
     case MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS:
-        qbus_reset_all(&s->bus.qbus);
+        qbus_reset_all(BUS(&s->bus));
         break;
 
     default:
@@ -803,7 +803,7 @@ static void mptsas_soft_reset(MPTSASState *s)
     s->intr_mask = MPI_HIM_DIM | MPI_HIM_RIM;
     mptsas_update_interrupt(s);
 
-    qbus_reset_all(&s->bus.qbus);
+    qbus_reset_all(BUS(&s->bus));
     s->intr_status = 0;
     s->intr_mask = save_mask;
 
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 2994f0738fd8..12d21bbc613c 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -696,7 +696,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev)
 
     assert(!s->dataplane_started);
     s->resetting++;
-    qbus_reset_all(&s->bus.qbus);
+    qbus_reset_all(BUS(&s->bus));
     s->resetting--;
 
     vs->sense_size = VIRTIO_SCSI_SENSE_DEFAULT_SIZE;
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 16/16] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (14 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 15/16] hw/scsi: " Laurent Vivier
@ 2019-06-06 11:06 ` Laurent Vivier
  2019-06-06 14:04 ` [Qemu-devel] [PULL 00/16] Trivial branch patches Peter Maydell
  16 siblings, 0 replies; 19+ messages in thread
From: Laurent Vivier @ 2019-06-06 11:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, David Hildenbrand,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	qemu-s390x, Cornelia Huck, Laurent Vivier, qemu-trivial,
	Michael Walle, Aleksandar Markovic, Paolo Bonzini

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Rather than looking inside the definition of a DeviceState with
"s->qdev", use the QOM prefered style: "DEVICE(s)".

This patch was generated using the following Coccinelle script:

    // Use DEVICE() macros to access DeviceState.qdev
    @use_device_macro_to_access_qdev@
    expression obj;
    identifier dev;
    @@
    -&obj->dev.qdev
    +DEVICE(obj)

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190528164020.32250-11-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/watchdog/wdt_i6300esb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c
index 1c6eddf86aea..f2d1e86526f2 100644
--- a/hw/watchdog/wdt_i6300esb.c
+++ b/hw/watchdog/wdt_i6300esb.c
@@ -200,7 +200,7 @@ static void i6300esb_timer_expired(void *vp)
         if (d->reboot_enabled) {
             d->previous_reboot_flag = 1;
             watchdog_perform_action(); /* This reboots, exits, etc */
-            i6300esb_reset(&d->dev.qdev);
+            i6300esb_reset(DEVICE(d));
         }
 
         /* In "free running mode" we start stage 1 again. */
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus
  2019-06-06 11:06 ` [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: " Laurent Vivier
@ 2019-06-06 12:11   ` David Hildenbrand
  0 siblings, 0 replies; 19+ messages in thread
From: David Hildenbrand @ 2019-06-06 12:11 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Dmitry Fleytman, Michael S. Tsirkin,
	Michael Tokarev, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Halil Pasic, Christian Borntraeger, Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	Cornelia Huck, qemu-s390x, qemu-trivial, Michael Walle,
	Aleksandar Markovic, Paolo Bonzini

On 06.06.19 13:06, Laurent Vivier wrote:
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Rather than looking inside the definition of a BusState with "s->bus.qbus",
> use the QOM prefered style: "BUS(&s->bus)".
> 
> This patch was generated using the following Coccinelle script:
> 
>     // Use BUS() macros to access BusState.qbus
>     @use_bus_macro_to_access_qbus@
>     expression obj;
>     identifier bus;
>     @@
>     -&obj->bus.qbus
>     +BUS(&obj->bus)
> 
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> Message-Id: <20190528164020.32250-5-philmd@redhat.com>
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  hw/s390x/event-facility.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index ee5b83448b11..e574223a226b 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -466,12 +466,12 @@ static void init_event_facility(Object *obj)
>      new = object_new(TYPE_SCLP_QUIESCE);
>      object_property_add_child(obj, TYPE_SCLP_QUIESCE, new, NULL);
>      object_unref(new);
> -    qdev_set_parent_bus(DEVICE(new), &event_facility->sbus.qbus);
> +    qdev_set_parent_bus(DEVICE(new), BUS(&event_facility->sbus));
>  
>      new = object_new(TYPE_SCLP_CPU_HOTPLUG);
>      object_property_add_child(obj, TYPE_SCLP_CPU_HOTPLUG, new, NULL);
>      object_unref(new);
> -    qdev_set_parent_bus(DEVICE(new), &event_facility->sbus.qbus);
> +    qdev_set_parent_bus(DEVICE(new), BUS(&event_facility->sbus));
>      /* the facility will automatically realize the devices via the bus */
>  }
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 00/16] Trivial branch patches
  2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
                   ` (15 preceding siblings ...)
  2019-06-06 11:06 ` [Qemu-devel] [PULL 16/16] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev Laurent Vivier
@ 2019-06-06 14:04 ` Peter Maydell
  16 siblings, 0 replies; 19+ messages in thread
From: Peter Maydell @ 2019-06-06 14:04 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Fam Zheng, Dmitry Fleytman, David Hildenbrand, Michael Tokarev,
	QEMU Developers, Gerd Hoffmann, Juan Quintela, Aleksandar Rikalo,
	Michael S. Tsirkin, Halil Pasic, Christian Borntraeger,
	Dr. David Alan Gilbert, Yuval Shaia, Alex Williamson,
	Richard Henderson, Daniel P. Berrangé,
	Cornelia Huck, qemu-s390x, QEMU Trivial, Michael Walle,
	Aleksandar Markovic, Paolo Bonzini

On Thu, 6 Jun 2019 at 12:18, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 47fbad45d47af8af784bb12a5719489edcd89b4c:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-06-04 17:22:42 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/trivial-branch-pull-request
>
> for you to fetch changes up to f1114d321246f9177072923e1c2a20e7aab82700:
>
>   hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev (2019-06-06 11:55:04 +0200)
>
> ----------------------------------------------------------------
> Trivial fixes 06/06/2019
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-06-06 14:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 11:06 [Qemu-devel] [PULL 00/16] Trivial branch patches Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 01/16] hw/rdma: Delete unused headers inclusion Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 02/16] migration: fix a typo Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 03/16] vhost: fix incorrect print type Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 04/16] util: Adjust qemu_guest_getrandom_nofail for Coverity Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 05/16] test: Fix make target check-report.tap Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 06/16] docs/devel/build-system: Update an example Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 07/16] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 08/16] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 09/16] hw/s390x/event-facility: " Laurent Vivier
2019-06-06 12:11   ` David Hildenbrand
2019-06-06 11:06 ` [Qemu-devel] [PULL 10/16] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 11/16] hw/usb-storage: " Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 12/16] hw/vfio/pci: " Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 13/16] hw/audio/ac97: " Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 14/16] hw/sd: Use the QOM BUS() macro to access BusState.qbus Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 15/16] hw/scsi: " Laurent Vivier
2019-06-06 11:06 ` [Qemu-devel] [PULL 16/16] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev Laurent Vivier
2019-06-06 14:04 ` [Qemu-devel] [PULL 00/16] Trivial branch patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.