powerpc/powernv/pci: fix iterator signedness
authorAndrzej Hajda <a.hajda@samsung.com>
Wed, 17 Aug 2016 10:03:05 +0000 (12:03 +0200)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 22 Aug 2016 01:09:33 +0000 (11:09 +1000)
commit6096481649ac27466cf2b453f185b43f680bf541
treec7711132e4e63561e52070d6049d3d3e5283f30c
parent2dd9c11b9d4dfbd6c070eab7b81197f65e82f1a0
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>
arch/powerpc/platforms/powernv/pci-ioda.c