int bus = -1;
while (bus < GET_GLOBAL(MaxPCIBus)) {
bus++;
- int bdf, max;
- foreachbdf_in_bus(bdf, max, bus) {
+ int bdf;
+ foreachbdf(bdf, bus) {
u32 v = pci_config_readl(bdf, PCI_VENDOR_ID);
if (v != id)
continue;
int bus = -1;
while (bus < GET_GLOBAL(MaxPCIBus)) {
bus++;
- int bdf, max;
- foreachbdf_in_bus(bdf, max, bus) {
+ int bdf;
+ foreachbdf(bdf, bus) {
u32 v = pci_config_readl(bdf, PCI_CLASS_REVISION);
if ((v>>8) != classprog)
continue;