powerpc/powernv/pci: fix iterator signedness

Unsigned type is always non-negative, so the loop could not end in case
condition is never true.

The problem has been detected using semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Andrzej Hajda 2016-08-17 12:03:05 +02:00 коммит произвёл Benjamin Herrenschmidt
Родитель 2dd9c11b9d
Коммит 6096481649
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -149,7 +149,7 @@ static void pnv_ioda_reserve_pe(struct pnv_phb *phb, int pe_no)
static struct pnv_ioda_pe *pnv_ioda_alloc_pe(struct pnv_phb *phb)
{
unsigned long pe = phb->ioda.total_pe_num - 1;
long pe;
for (pe = phb->ioda.total_pe_num - 1; pe >= 0; pe--) {
if (!test_and_set_bit(pe, phb->ioda.pe_alloc))