On Thu, Nov 10, 2016 at 08:21:54PM +0100, Andrew Jones wrote: [...] > > /* Scan bus look for a specific device. Only bus 0 scanned for now. */ > > pcidevaddr_t pci_find_dev(uint16_t vendor_id, uint16_t device_id) > > { > > pcidevaddr_t dev; > > > > - for (dev = 0; dev < 256; ++dev) { > > + for (dev = 0; dev < PCI_DEVFN_MAX; ++dev) > > if (pci_config_readw(dev, PCI_VENDOR_ID) == vendor_id && > > pci_config_readw(dev, PCI_DEVICE_ID) == device_id) > > return dev; > > - } > > I liked the {} here because the "one" line spans three. Sure. I'll keep them. [...] > > -void pci_bar_print(pcidevaddr_t dev, int bar_num) > > +void pci_bar_print(struct pci_dev *dev, int bar_num) > > { > > phys_addr_t size, start, end; > > uint32_t bar; > > @@ -187,6 +195,9 @@ static void pci_dev_print(pcidevaddr_t dev) > > uint8_t subclass = pci_config_readb(dev, PCI_CLASS_DEVICE); > > uint8_t class = pci_config_readb(dev, PCI_CLASS_DEVICE + 1); > > int i; > > + struct pci_dev pci_dev; > > Putting that above the 'int i' would appease my aesthetics OCD... Sure. [...] > Besides my nits > > Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx> Thanks, -- peterx -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html