diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-06-23 17:36:55 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-23 17:49:49 +0300 |
commit | 20de98aff5471f4c849f456d2f9716c748a1c05c (patch) | |
tree | 1840f39aa18994b07a2dd6cfac6a4201d75b4a94 /hw/pci | |
parent | 554f802da3f8b09b16b9a84ad5847b2eb0e9ad2b (diff) |
pcie: coding style tweak
- whitespace fix
- unnecessary != 0 in a condition
Cc: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r-- | hw/pci/pcie.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index da32589393..a123c01ef1 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, |