From nobody Sat May 18 23:55:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062538; cv=none; d=zoho.com; s=zohoarc; b=kjm16VjmdNHHH6Ad5Zg/7uHeJvIdHMatLY9SPeYn10xQYWZOlA3sOWil0nMQTWQST3mj96lS5ajntdhkjbasXkd5PVn8IDoJNtcIA11GGa7LaSpN1GWZFXT9giA+cxpQuK9mgFESrLWvNpqvZJHr6IizQDMloJYQeJ3XTlpYRm0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062538; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=R8plwk7Cw2C3NZtaMSTcjzPbbSkb1DYhAyWP6HPk1nc=; b=f9AZeggVFBAMvCeMXybRgTQjFVQO6nBwI1xF+1unvHPzpkJiRhS9KO6DUvCvUqsSchbsvNh2XwpDfYSTTXTwOibS5hXQNLPCFFL8uYKmiq2CmCxR/Fn3th3j51C0vtyCN3CrjbR6UtYnmaA9gGTeqWX50N3u8bvPuqGPBOGzwqM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062538647107.08040050760303; Tue, 28 May 2019 09:55:38 -0700 (PDT) Received: from localhost ([127.0.0.1]:39609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfNo-0003QW-MJ for importer@patchew.org; Tue, 28 May 2019 12:55:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCu-000376-T8 for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfCt-0002gk-RZ for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfCt-0000Q9-MC; Tue, 28 May 2019 12:44:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED7F230B337B; Tue, 28 May 2019 16:41:24 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E1EC60BDF; Tue, 28 May 2019 16:41:15 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:11 +0200 Message-Id: <20190528164020.32250-2-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 28 May 2019 16:41:32 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 01/10] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=C3=A9 Reviewed-by: Dmitry Fleytman --- v2: Use BUS() macro (Peter Maydell) One step toward removing qbus_reset_all_fn() --- 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 584b4be07e..c39e33fa35 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"); =20 s->resetting++; - qbus_reset_all_fn(&s->bus); + qbus_reset_all(BUS(&s->bus)); s->resetting--; return PVSCSI_COMMAND_PROCESSING_SUCCEEDED; } --=20 2.20.1 From nobody Sat May 18 23:55:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062069; cv=none; d=zoho.com; s=zohoarc; b=JvL0h5dlUTZ+ppdKjiSHIOOm7cG+2bjmSpyRpMzbTY72rM0Yvd4CP6u+HL6Q/LYGqlRLh6QWuhMotZrxkdiiE0ccoDHchLvFovv9vIc7FrWhc5OqvCm1UBx5EDAotSiVBfREzvCbH9LQap4UOiFAbFzSyv7zSm/43xzqidcqM2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062069; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=BRCMsrLKSvYADcmiH362DPDPEuk+OlVPxXb5YhfjF/Y=; b=dq+5wtT2QRPAKbY2Ign8iLBwrdmnMkxPSwJAeM0EDuZZn5Z7Ixf4ggpvToGQlNz9uvIIbDemX89Zoh01PeiNYGBc9XBJptifwqlZ385W/fFTqLtBWe45GBJznQoPnpl4AODghCjNqPeIHDLnzzLJ6In7DiFMpEX9EhWO21dLoIA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062069934957.6689108473072; Tue, 28 May 2019 09:47:49 -0700 (PDT) Received: from localhost ([127.0.0.1]:39469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfGF-0005Rc-PU for importer@patchew.org; Tue, 28 May 2019 12:47:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfC9-0002Mh-Bd for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC3-0001VV-Vj for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4031) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC3-0000WJ-Kd; Tue, 28 May 2019 12:43:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5EB8F772EE; Tue, 28 May 2019 16:41:34 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0E644251; Tue, 28 May 2019 16:41:25 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:12 +0200 Message-Id: <20190528164020.32250-3-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 28 May 2019 16:41:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 02/10] hw/scsi: Use the QOM BUS() macro to access BusState.qbus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier --- 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 da7239d94f..a8b7a199f9 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1860,7 +1860,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, u= int8_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 |=3D 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 929404fb48..e800683e91 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -540,7 +540,7 @@ reply_maybe_async: break; =20 case MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS: - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); break; =20 default: @@ -803,7 +803,7 @@ static void mptsas_soft_reset(MPTSASState *s) s->intr_mask =3D MPI_HIM_DIM | MPI_HIM_RIM; mptsas_update_interrupt(s); =20 - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); s->intr_status =3D 0; s->intr_mask =3D save_mask; =20 diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 839f120256..2a71b78e22 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -696,7 +696,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev) =20 assert(!s->dataplane_started); s->resetting++; - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); s->resetting--; =20 vs->sense_size =3D VIRTIO_SCSI_SENSE_DEFAULT_SIZE; --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062508; cv=none; d=zoho.com; s=zohoarc; b=iI3A5q2zqWGR9qmm7pgV83SGkXModRkmr6GX+qgL+Bk0mSsCkXR9IQFl34I0IfVQJCLTt6/fh1ZbMQ9OGIf4jrC/0YObcmX08ohGjA/2cuqwTlFgiOrFtkbzXu3YlmpXS05au5uxTEtYYB1Vo1jMtxOC3/bDWd39Zlek2+m5DtQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062508; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jE/ILhVaZ/4i/PgxnDB/VISL7kNLMU/XEIzlvm2MHOY=; b=IaZ2XnqNKfme2giDqypvQlisQ5uB85qQOsGKCDOIiyXUHHTlDeMX28jDYZZ8K7/Hat6k0jvkzoMFz5V9auIoC4hmh5sED6rfNgx/F6Fm73KGGZljV0GBgWg03gvIJ0/M89xNHJIVAtOOOYSe3/b3onh9n6Q12D7FEeIzgcBNKjc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15590625089131023.2266579653065; Tue, 28 May 2019 09:55:08 -0700 (PDT) Received: from localhost ([127.0.0.1]:39599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfNN-00035l-UJ for importer@patchew.org; Tue, 28 May 2019 12:55:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCt-00034j-Lh for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfCr-0002ai-No for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51545) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfCp-0000oS-S2; Tue, 28 May 2019 12:44:08 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 541BA309B15B; Tue, 28 May 2019 16:41:45 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A3EC60BDF; Tue, 28 May 2019 16:41:34 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:13 +0200 Message-Id: <20190528164020.32250-4-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 28 May 2019 16:41:51 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marcel Apfelbaum --- 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 c6d9ded320..8d954885c0 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 =3D 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)); } } =20 --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559061949; cv=none; d=zoho.com; s=zohoarc; b=ogZVAhPu8kvzYpIAWwuvpARQ6jffS/ao/sJForQNQ+a1nEM8h2IUtYNS9XUBi4WvMFy/Kae2/uoM+fkev/FM/ZR5VwZwBWO6N1sOGS7uk7eyiCk62OV98pdBBsQi7+Q5+9DbtpNLtO9t6DB3ysJDyYEIoifzIstWzZZXZQk5psQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559061949; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=AVEXw5dU8vwiZBP4zgjhYJ17Wh4DJCkuLYBg4rvC+aI=; b=nuDv+/nkjxuzFuLFqU3wydPkzmhpGDeD4EEU25vcYOa3JUazWTVoEpxkR0/MctSxMVMPzipOOf75lbphi3XHYhF7lPbEDABq3WKaMDmhSA9jSelCVJaM8YXNKgiaF7eF/6jK83SY0LeCajBa6hRmnRRx9C9bvV25kynDipVt1PU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559061949672825.4102375379069; Tue, 28 May 2019 09:45:49 -0700 (PDT) Received: from localhost ([127.0.0.1]:39419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfDp-0003XA-C6 for importer@patchew.org; Tue, 28 May 2019 12:45:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfC5-0002KB-Vc for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC3-0001UY-9s for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC3-0000pZ-18; Tue, 28 May 2019 12:43:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89E6D306E61C; Tue, 28 May 2019 16:41:54 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB9FF1F8; Tue, 28 May 2019 16:41:45 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:14 +0200 Message-Id: <20190528164020.32250-5-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 28 May 2019 16:41:54 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 04/10] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck --- 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 ee5b83448b..e574223a22 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 =3D 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)); =20 new =3D 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 */ } =20 --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062313; cv=none; d=zoho.com; s=zohoarc; b=dm/jmTRiTNpoCsVJDxcZR1dorSH9sCuZwLz5CrVR6RZmtHBUZFxatbs5566IyMfJqK5f2Y6OsEFqVcir4oBVymBy+MJJnBHMwK1LMclJgcNjRS27PMqq4jptdIAMcyaHfm8CwAZ3cu2duI6lWDIe8BliV4DcBgX+lBawmMVRnO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062313; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=JLN1PZMdcCBl99rgzMCgZF3c3cU3UZW6sbtaZHQuh2o=; b=cMjX2spI2eij8aaWbKrfdxPPSq/13oiax9jAaGtQkruKE7Ol9sNV4gsuMs3C6KhE5Z0u56jt3n1DowhUJEaEOguOfQzLW952cQzq7n9g9nc6xrjdZLeYGlXtuOiT2FcO7XGcAvqvO/swl3Yk8rmh4uiNcDRUhxtNvfRMfrfiW3w= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062313008905.9858643784556; Tue, 28 May 2019 09:51:53 -0700 (PDT) Received: from localhost ([127.0.0.1]:39545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfKE-00009S-0t for importer@patchew.org; Tue, 28 May 2019 12:51:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCG-0002Sm-0R for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC4-0001Ww-Nu for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55848) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC4-0000rh-EZ; Tue, 28 May 2019 12:43:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F5563179177; Tue, 28 May 2019 16:42:05 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C49E60BDF; Tue, 28 May 2019 16:41:54 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:15 +0200 Message-Id: <20190528164020.32250-6-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 28 May 2019 16:42:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 05/10] hw/sd: Use the QOM BUS() macro to access BusState.qbus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- 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 df42aa1c54..dd1ba649d9 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 =3D drive_get_next(IF_SD); blk =3D dinfo ? blk_by_legacy_dinfo(dinfo) : NULL; - carddev =3D qdev_create(&s->sdbus.qbus, TYPE_SD_CARD); + carddev =3D 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 623d0333e8..25e1009277 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 =3D drive_get_next(IF_SD); - carddev =3D qdev_create(&s->sdbus.qbus, TYPE_SD_CARD); + carddev =3D qdev_create(BUS(&s->sdbus), TYPE_SD_CARD); if (dinfo) { qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), = &err); } --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559061926; cv=none; d=zoho.com; s=zohoarc; b=i4RJ8X7AXtXpyTosM0cKtn8VwidS5z8zpHcfNVKCQRO/+/uDbxs32b9PMVe+ptoaMPXrtx6kgxDpJk6xu6Qc7x2yfAVnO9tZmRYFPY3g8ZQ+4r6GUb8bXuJnLrJ/mn5EDb2bjw5Hpa8op+Qu5t7Sly/4+xnyPR3rHKrlLCoRKq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559061926; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=gCwZ1RWDxuSyi/nj+8AzJ6t06jOCxUVBE175ffLit5Y=; b=TtrHYuzsiZWykQSbTT0WhFOtWAaB3UbpVWdfQ8zS9VV31RaCy4fhTHonZcFunQF0p4nttYsTjYRRHvcv5QsxaNgy9TcdV77uNeh/zr/uP+7GTUZjl83oOuk+Jy1wfuxGVowNbXRYv4jLFZ/ffkb0Ozdc0M6l0r7wFQA+MjoBnao= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559061926897769.8077728998602; Tue, 28 May 2019 09:45:26 -0700 (PDT) Received: from localhost ([127.0.0.1]:39421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfDy-0003eZ-PF for importer@patchew.org; Tue, 28 May 2019 12:45:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCC-0002Qv-Og for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC4-0001Va-1B for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49174) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC3-0000uy-Mi; Tue, 28 May 2019 12:43:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 65BF430BBE69; Tue, 28 May 2019 16:42:13 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A884460BDF; Tue, 28 May 2019 16:42:05 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:16 +0200 Message-Id: <20190528164020.32250-7-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 28 May 2019 16:42:13 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 06/10] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell . --- 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 2265622d44..a4e8d99e77 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)); } =20 static void ac97_exit(PCIDevice *dev) --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062019; cv=none; d=zoho.com; s=zohoarc; b=RWY7AbySAarmqN8ajHw3T2T5pzd5K+qqWGxV4Pq2qTgt853Kdb8aw1GrChJHlT/+uv5fX+cUWK9vK6HR9K0Ko954dtufpA6HEqQR1lpTQ4dclCPQ7Vnqdh+JcB8sRlc1u58FQaSNr0rH5iQ8IbYnun7xSJuv7csEsDttLziQv6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062019; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=evjMJWsUTMzqGVB8zjkZRV20xGchXKT6b8fVT1R1u98=; b=djtRvNkqGybvEtDf9D4I1PZnxZ7A84iwd9QDAE6pfUSVFeBIx9B5hWdiZP3648vZYTvKmCgD6Ds4iz831eka4qfp2QloM9irPZ5mroMykvN+/n5OF+HHgxuzdKyALRWnlPk1jp+XcGaxTVCPBMczRn5W2z3ASxf/yI2LkSYfcZA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062019374326.0840138150469; Tue, 28 May 2019 09:46:59 -0700 (PDT) Received: from localhost ([127.0.0.1]:39463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfFU-0004st-As for importer@patchew.org; Tue, 28 May 2019 12:46:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCr-000322-OR for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfCq-0002V9-01 for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfCp-0000yI-Mz; Tue, 28 May 2019 12:44:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE8F4C05D419; Tue, 28 May 2019 16:42:21 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F7F960BDF; Tue, 28 May 2019 16:42:13 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:17 +0200 Message-Id: <20190528164020.32250-8-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 28 May 2019 16:42:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 07/10] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marcel Apfelbaum --- 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 031ee9cd93..35d17246e9 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_enab= led) true); } =20 - ich9_lpc_reset(&lpc->d.qdev); + ich9_lpc_reset(DEVICE(lpc)); } =20 /* APM */ diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 85d0532dd5..d46754f61c 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] =3D s->smb_io_base | 1; pci_conf[0x91] =3D s->smb_io_base >> 8; pci_conf[0xd2] =3D 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.i= o); =20 apm_init(dev, &s->apm, NULL, s); --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062113; cv=none; d=zoho.com; s=zohoarc; b=lHFqmVAW2jQDYCFFvgWDy7KSEx6t1xrUyCyzWWnMiY1rsVxTczooxBlmv8e+APqeqEObRp7YYem6YmEBRTC5/kskqS5CmgRn08EvDBZCfCw4ulkJL3iZJyt4PDa1YVZDZBmMtXriKgzWSigBRvWKPBAviLFGC7GVYdyeaxbaboA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062113; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qAeWewqalVs/SLS9ILxTCKkdy9lG+wEhn8+BRBeExSY=; b=f0n+4YYiSQVAEfLrZeHKFojgUhdhJrsPhHh6xSXJ78s3nxvkUigPcXkucDYlOrWO16tt71RyWtIY3RPq/6CzIGN8CJNkoJkn5wd7lyt6MwBGaEDK9AFTEopNwbvO32fmvFUBA6BP3KerkI5iUoQ4gyDgUTVxVUFvSgevj3Q1A9Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062113211241.07593946243662; Tue, 28 May 2019 09:48:33 -0700 (PDT) Received: from localhost ([127.0.0.1]:39471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfH0-00060V-59 for importer@patchew.org; Tue, 28 May 2019 12:48:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCE-0002RX-NN for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC4-0001W9-Ca for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35124) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC4-00013B-4e; Tue, 28 May 2019 12:43:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF82F300BEA9; Tue, 28 May 2019 16:42:30 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7732160BDF; Tue, 28 May 2019 16:42:22 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:18 +0200 Message-Id: <20190528164020.32250-9-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 28 May 2019 16:42:31 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 08/10] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gerd Hoffmann --- 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 cd5551d94f..0e4e93ef16 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, Err= or **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 =3D NULL; =20 usb_desc_create_serial(dev); --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062214; cv=none; d=zoho.com; s=zohoarc; b=hHZzQy60iFx/5wprUSPh9FT2xMhc+RiRG5XOXzpBFgsq7rsoJWItpdURVXV2CTJwyl+O6RL7EDmuqdsnuxtLSVV6v7rtFv6/hYmiUtjaXwr5wBzF4pdYfJTxbokJ7gkcNj/oeEQAR90a3GAPF51Z48+IXCsjXsABtEZ8zJz1Vts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xcx9AIQ5xXMqiX/8kZ9PO/7CjYwJdX3/8mScq/pdy9Y=; b=cGe6mgsz2/Vvu82DLzUFyI1uE2bJtvGlmhTgEIouaVU4qmbRsPqz3V/X5qvUx291tFuUL6RKoZFVBxQfN7/serdiAbCEOVkNeG5Cf892qZD2OKhte8jWBt0W37Rhg7R0xZ8fzC56nb8NJUhZQvzHOvH/gPBIQy7Uk4karanMBps= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062214927197.81382248938428; Tue, 28 May 2019 09:50:14 -0700 (PDT) Received: from localhost ([127.0.0.1]:39499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfId-0007GS-RV for importer@patchew.org; Tue, 28 May 2019 12:50:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCu-000378-Tz for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfCt-0002gd-PJ for qemu-devel@nongnu.org; Tue, 28 May 2019 12:44:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42932) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfCt-0001AQ-JM; Tue, 28 May 2019 12:44:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 572CE3092661; Tue, 28 May 2019 16:42:49 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD63060BDF; Tue, 28 May 2019 16:42:31 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:19 +0200 Message-Id: <20190528164020.32250-10-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 28 May 2019 16:42:49 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 09/10] hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alex Williamson --- 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 8e555db12e..2a4091d216 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2717,7 +2717,7 @@ static void vfio_req_notifier_handler(void *opaque) return; } =20 - 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 **err= p) vdev->vbasedev.name =3D g_path_get_basename(vdev->vbasedev.sysfsdev); vdev->vbasedev.ops =3D &vfio_pci_ops; vdev->vbasedev.type =3D VFIO_DEVICE_TYPE_PCI; - vdev->vbasedev.dev =3D &vdev->pdev.qdev; + vdev->vbasedev.dev =3D DEVICE(vdev); =20 tmp =3D g_strdup_printf("%s/iommu_group", vdev->vbasedev.sysfsdev); len =3D readlink(tmp, group_path, sizeof(group_path)); --=20 2.20.1 From nobody Sat May 18 23:55:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559062119; cv=none; d=zoho.com; s=zohoarc; b=KEXm6Q1thtCMWiPkulzHhCL8RDs4xIv4IPa+jBncdO3Yw9IpZ9xQJC+IiztFVjjRaVgCS6nN47BFhfVgIYpgr7gPy4G4V4sIA18575O7a8EgURD9Hsesyk6GInSQmTo7Gx70V7fs745dysd+F3Qea/60UXng+OSQABqas1ea05M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559062119; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zTixO30q/uQVIUV+x1tCvuMtkI9+Ex46YDNEVGPwYXk=; b=epqvaYJ3BUXBwmVM5fweki1hjmlS7AQx5rL7j0IoQbhYtVzOmuB7/tR36Wj/MEnPvlfyKiy8witZXFBopUBfQTlfOtkDpScj36RJnvi59qUqYy0GyVu0xz0iyb4WA9FdDIYrMQHnEj1M0Ddsj+KlS97LkcmTorughOOhy/diddo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559062119203839.2592362230237; Tue, 28 May 2019 09:48:39 -0700 (PDT) Received: from localhost ([127.0.0.1]:39477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfHA-000662-4Q for importer@patchew.org; Tue, 28 May 2019 12:48:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfCE-0002RU-ND for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfC4-0001Wa-Gw for qemu-devel@nongnu.org; Tue, 28 May 2019 12:43:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49516) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVfC4-0001QA-83; Tue, 28 May 2019 12:43:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 148829FFD4; Tue, 28 May 2019 16:43:12 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.206.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 20E1060BDF; Tue, 28 May 2019 16:42:49 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 28 May 2019 18:40:20 +0200 Message-Id: <20190528164020.32250-11-philmd@redhat.com> In-Reply-To: <20190528164020.32250-1-philmd@redhat.com> References: <20190528164020.32250-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 28 May 2019 16:43:12 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 10/10] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , Aleksandar Markovic , "Michael S. Tsirkin" , Aleksandar Rikalo , Markus Armbruster , David Hildenbrand , Alex Williamson , qemu-s390x@nongnu.org, Halil Pasic , Christian Borntraeger , Michael Walle , Gerd Hoffmann , Cornelia Huck , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier --- 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 1c6eddf86a..f2d1e86526 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 =3D 1; watchdog_perform_action(); /* This reboots, exits, etc */ - i6300esb_reset(&d->dev.qdev); + i6300esb_reset(DEVICE(d)); } =20 /* In "free running mode" we start stage 1 again. */ --=20 2.20.1