]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitce62bee727a9776fc6e7143c239a2df3aca94b7e
treeb7370fca436732335e5345aba5fd901aab02dffd
parent883fe80465c54fa9ebc691979ffaea9455611a04
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