OSDN Git Service

PCI: Use PCI_SRIOV_NUM_BARS in loops instead of PCI_IOV_RESOURCE_END
authorDenis Efremov <efremov@linux.com>
Tue, 6 Aug 2019 14:07:15 +0000 (17:07 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 8 Aug 2019 20:12:12 +0000 (15:12 -0500)
commit39098edbd79e5c9a4357eb924cb259d1c8a11346
treeb7370fca436732335e5345aba5fd901aab02dffd
parentb8074aa2460b535915e8f65bf83c4bcb4220f804
PCI: Use PCI_SRIOV_NUM_BARS in loops instead of PCI_IOV_RESOURCE_END

Writing loop conditions as "i < NUM" is a common C idiom; using "i <= END"
is unusual and thus prone to errors.  Change loops to use the former.

Link: https://lore.kernel.org/r/20190806140715.19847-1-efremov@linux.com
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
drivers/pci/iov.c
drivers/pci/setup-bus.c