Received: from eggs.gnu.org ([2001:4830:134:3::10]:38019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz6ZE-0005AP-1D for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:54:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz6Z6-0001yt-IQ for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:53:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz6Z6-0001yh-BP for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:53:52 -0400 Date: Mon, 23 Jun 2014 18:54:14 +0300 From: "Michael S. Tsirkin" Message-ID: <1403538745-18622-21-git-send-email-mst@redhat.com> References: <1403538745-18622-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1403538745-18622-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 20/23] pcie: coding style tweak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Marcel Apfelbaum - whitespace fix - unnecessary != 0 in a condition Cc: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index da32589..a123c01 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -353,11 +353,9 @@ void pcie_cap_slot_reset(PCIDevice *dev) PCI_EXP_SLTCTL_AIC_OFF); if (dev->cap_present & QEMU_PCIE_SLTCAP_PCP) { - bool populated; - uint16_t pic; - /* Downstream ports enforce device number 0. */ - populated = (pci_bridge_get_sec_bus(PCI_BRIDGE(dev))->devices[0] != NULL); + bool populated = pci_bridge_get_sec_bus(PCI_BRIDGE(dev))->devices[0]; + uint16_t pic; if (populated) { pci_word_test_and_clear_mask(exp_cap + PCI_EXP_SLTCTL, @@ -369,7 +367,7 @@ void pcie_cap_slot_reset(PCIDevice *dev) pic = populated ? PCI_EXP_SLTCTL_PIC_ON : PCI_EXP_SLTCTL_PIC_OFF; pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTCTL, pic); - } + } pci_word_test_and_clear_mask(exp_cap + PCI_EXP_SLTSTA, PCI_EXP_SLTSTA_EIS |/* on reset, -- MST