From patchwork Thu Jun 6 11:06:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1111047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45KNKP3dy5z9sND for ; Thu, 6 Jun 2019 21:12:09 +1000 (AEST) Received: from localhost ([127.0.0.1]:58435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqJT-0003fm-Dl for incoming@patchwork.ozlabs.org; Thu, 06 Jun 2019 07:12:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqFL-0000P7-Tk for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYqFI-0003X6-6V for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:07:50 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:38547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYqF6-0003EB-FB; Thu, 06 Jun 2019 07:07:36 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MkIAB-1gokqY1WHJ-00kkA9; Thu, 06 Jun 2019 13:06:51 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 6 Jun 2019 13:06:17 +0200 Message-Id: <20190606110625.32127-9-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190606110625.32127-1-laurent@vivier.eu> References: <20190606110625.32127-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:hp5C+eRkhKhZrL9ujfcR5R1twR4hIZGd7hOEgFE+5WIY2q2d8lY kN/JEeng4lPu0Ecb53uf5a36SNII/prxc7ozqApBR4wgoSiD282kjxkkuv3171iGM7yuz+r hONn0dYWoQi/b5920YVliGTFHcx0mDmfK75CcNl6N3MlE3EcdEwG1ZCC6ecgj9m33FqnDAN jSJz3ir0wPZLxcfDxFnTw== X-UI-Out-Filterresults: notjunk:1; V03:K0:WFMkMbI5+Qk=:l7BrzmzlCtS/uryTbB9SRq UjqIEOfGTswngkSpPUcZpXPwpySk2vU3hbL4UIf8mB5WfpmlQlwPQGwchlNjb8lOnACSxA08F db7lwXFr1dnLD4BV0GFXZ1OnNkSFuXdZqzYizIGmh7R9q9qpibg6UOZHtPlzJ00ikH4tFF9sW zLAt1MzgY0vxILRJzrsVGA/eriWyAYUfh4FL+qpxqwngkunsk86+PmLmsRgjTGT/9AJxOgj3Y 3kksLEbdbBxR//IDg6AC2hGCheQ3LPYjQ4I9Lz5uNgchjdntKfhUm8R7LwB0rkqcIAB3jowY6 CoU4I6jA8iJ39VRflpFyobnM5jV642+W8kyU6YGKHnRbiV2QJJsvzg+V1uTxUmLVSQmF9aRZN b48wRQ3TbUFX2UNpbAdb99WR4z8aiq4oaeAw5jZVdocc36+seHz0CqiM/+D1DEw4bYYQZjB8z Z5oB7GN5hd13Av/VSaLpG0AjkT5tXYK4oFntOS93kDN6RacwFdD+p5iyg7s5mT8Ur5A77rQvP /dhIQPcRxJ/rIe7xQaieAEPDyZ/2f4dXXL2MH78x6aThvfOcc0rvHW/d0IMVQ4KDVnr0AJUZ/ 99+OKSg1ON+mDyPixOqeNQj94jgcU+k1nnfQHT2Uh8aaIihEqRVfdOYNP/Rye0bny4OOgYAFN Dg79EVs9kP+U01ZTdjx7HCPrWvLjNLpksR2v+kf2i1dQ9C2L1gZ7Dr8VTcuDYlQnnQLN4zCqo yxRFyOPap2hCxh5HggK7PmGcZp9NU16B4+zOrg0ppOewJ+GZCs5ebQoxs1A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL 08/16] 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 , David Hildenbrand , Michael Tokarev , Gerd Hoffmann , Juan Quintela , Aleksandar Rikalo , "Michael S. Tsirkin" , Halil Pasic , Christian Borntraeger , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Yuval Shaia , Alex Williamson , Richard Henderson , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-s390x@nongnu.org, Cornelia Huck , Laurent Vivier , qemu-trivial@nongnu.org, Michael Walle , Aleksandar Markovic , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é Reviewed-by: Marcel Apfelbaum Message-Id: <20190528164020.32250-4-philmd@redhat.com> Signed-off-by: Laurent Vivier --- 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)); } }