On Wed, Dec 7, 2011 at 12:23 PM, Don Dutile <ddutile@xxxxxxxxxx> wrote: > why not something more explicit like: > > for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { > if ((i >= PCI_IOV_RESOURCES) && (i <= PCI_IOV_RESOURCE_END)) > continue; /* skip sriov related resources */ > > if (dev->resource[i].flags & flags) > bars |= (1 << i); > } no, we should not put checking in the loop. also you will have problem when CONFIG_PCI_IOV is not defined. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html