Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/pci/pci_bus.c
Show First 20 Lines • Show All 482 Lines • ▼ Show 20 Lines | retry: | ||||
} | } | ||||
/* | /* | ||||
* Make sure we add at least one bridge since some old | * Make sure we add at least one bridge since some old | ||||
* hardware doesn't actually have a host-pci bridge device. | * hardware doesn't actually have a host-pci bridge device. | ||||
* Note that pci_cfgregopen() thinks we have PCI devices.. | * Note that pci_cfgregopen() thinks we have PCI devices.. | ||||
*/ | */ | ||||
if (!found) { | if (!found) { | ||||
#ifndef NO_LEGACY_PCIB | |||||
jrtc27: Why not ifndef out the if and comment? Leaving the comment outside the ifndef, and an empty… | |||||
Done Inline ActionsIf I remove the if then the compiler complains that found is being set but not used I figured this was cleaner than sprinkling more ifndefs throughout the function. cperciva: If I remove the `if` then the compiler complains that `found` is being set but not used I… | |||||
if (bootverbose) | if (bootverbose) | ||||
printf( | printf( | ||||
"legacy_pcib_identify: no bridge found, adding pcib0 anyway\n"); | "legacy_pcib_identify: no bridge found, adding pcib0 anyway\n"); | ||||
child = BUS_ADD_CHILD(parent, 100, "pcib", 0); | child = BUS_ADD_CHILD(parent, 100, "pcib", 0); | ||||
legacy_set_pcibus(child, 0); | legacy_set_pcibus(child, 0); | ||||
#endif | |||||
} | } | ||||
} | } | ||||
static int | static int | ||||
legacy_pcib_probe(device_t dev) | legacy_pcib_probe(device_t dev) | ||||
{ | { | ||||
if (pci_cfgregopen() == 0) | if (pci_cfgregopen() == 0) | ||||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |
Why not ifndef out the if and comment? Leaving the comment outside the ifndef, and an empty block, makes it seem like something is still done in the legacy pcib case.