From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hVfKg-0001PT-JL for mharc-qemu-trivial@gnu.org; Tue, 28 May 2019 12:52:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVfKe-0001Nr-M8 for qemu-trivial@nongnu.org; Tue, 28 May 2019 12:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVfKd-0000tH-Or for qemu-trivial@nongnu.org; Tue, 28 May 2019 12:52:12 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39737) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVfKb-0000oW-3i; Tue, 28 May 2019 12:52:09 -0400 Received: by mail-wm1-x343.google.com with SMTP id z23so3662263wma.4; Tue, 28 May 2019 09:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=6ldlFtM5sj3Tfe3IA2K9x58hOsQNZQg0u7lahDZJ3kk=; b=HkkiXKgMrten6dkXkmSezBTz2TVwp3lhSpYXcbHtOJMOpOAPxKpcgikVzSej9kXXtA PjyZtWVNh0SBqnkfShdAmGwvJRAmgIZ+yB2g62XUEZcx15e8uLFS+IK0Tf+/3f44mMlN omOh4wGu2txL5slQWPKhLMHND+lgOfmt2eyjBMHBAJmUEkNH/oW2Gk//+nIJxhSWf7Wc 2N0Cxw0htYeUOR4ZLdafZ41Gupnjyo3qRruUIxiXR9T8Ky67ZPV+3B7N2H0JkDwd+IXd QouBlOfQpU8Ds+q2NTMHtA8wJJEXbhjY8B9l2p6qH2aWbHujg+myaMjkE+L2+IWwr+Fz +3yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=6ldlFtM5sj3Tfe3IA2K9x58hOsQNZQg0u7lahDZJ3kk=; b=fL7YT0+IM1Bds6Z3Rpq1HSwD5DUSHhq8pTPe9a6ABu9m8gbPlDyv6ftZIlI+3WlpKZ tqfibRWHnMtTgBA9yBJJpjYMhl9CylEEiSO+Phy6HxshDUW9wdED4wpMgAfqNXcgtlfj GPkU626dROFbSHC6stgZnX/x8E3zru2+WmJD4djTyUrOsF7yYYeAFxgJBDIo972BpZ3i rahlzomkqF7eL4kdH5bxtoZ4S2l0/34sC86J4IJ52BrpxjaKgOI/bmVxGJJUuDKJqfqh jX7drELOr8BC6i/uIhriwpk5kH+uvrfUDhobRNO6Sm8pF0RxCrZjeWVMnyEEpCfEOF3R k3Hw== X-Gm-Message-State: APjAAAXBUtfuEhAPbLiSblG6b5rfIKIz5PkbZvjvcOVr66sP83Lllryq i/30uhszud9Fn1P8wvWHfoA= X-Google-Smtp-Source: APXvYqx+tf6fjwZu9xbb99dYH25fjonD8ZcUQSiPdyJdWlO5GwFhun/f/iGn5Dx4gmS854hzrEuJMw== X-Received: by 2002:a1c:5a43:: with SMTP id o64mr3798144wmb.31.1559062324983; Tue, 28 May 2019 09:52:04 -0700 (PDT) Received: from localhost.localdomain ([37.142.144.27]) by smtp.gmail.com with ESMTPSA id h188sm5292699wmf.48.2019.05.28.09.52.01 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 09:52:04 -0700 (PDT) To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: Dmitry Fleytman , "Michael S. Tsirkin" , Paolo Bonzini , Gerd Hoffmann , Aleksandar Rikalo , Halil Pasic , David Hildenbrand , Christian Borntraeger , Michael Walle , Richard Henderson , Aleksandar Markovic , Cornelia Huck , Alex Williamson , Peter Maydell , Fam Zheng , qemu-s390x@nongnu.org, Markus Armbruster References: <20190528164020.32250-1-philmd@redhat.com> <20190528164020.32250-4-philmd@redhat.com> From: Marcel Apfelbaum Message-ID: <10e9f842-9909-41f3-00c7-5c88a930211b@gmail.com> Date: Tue, 28 May 2019 19:52:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190528164020.32250-4-philmd@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: Re: [Qemu-trivial] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2019 16:52:13 -0000 On 5/28/19 7:40 PM, Philippe Mathieu-Daudé wrote: > 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é > --- > 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 = 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)); > } > } > Reviewed-by: Marcel Apfelbaum Thanks, Marcel