]> Git Repo - qemu.git/commitdiff
pcie: coding style tweak
authorMichael S. Tsirkin <[email protected]>
Mon, 23 Jun 2014 14:36:55 +0000 (17:36 +0300)
committerMichael S. Tsirkin <[email protected]>
Mon, 23 Jun 2014 14:49:49 +0000 (17:49 +0300)
- whitespace fix
- unnecessary != 0 in a condition

Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/pci/pcie.c

index da32589393c0fee9141c54bd746b744a009ff7d3..a123c01ef1adea536d3689eb826c6f059b4e059e 100644 (file)
@@ -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,
This page took 0.031996 seconds and 4 git commands to generate.