summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-05-17 20:54:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-05-18 08:24:46 +0200
commitebd5bb2cf2b2d9905f969c0ad0b51c2ede24792a (patch)
tree423731091f107414965f0558373b29060a19ef2f /arch/powerpc
parenteaa66a1c43d2e6357340e76d90874488453ed608 (diff)
downloadbarebox-ebd5bb2cf2b2d9905f969c0ad0b51c2ede24792a.tar.gz
barebox-ebd5bb2cf2b2d9905f969c0ad0b51c2ede24792a.tar.xz
powerpc: law: use signed type to allow error checking
unsigned idx is checked for >= 0 which is always true and < 0 which is never true. Use a signed type instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210517185424.32145-16-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mach-mpc85xx/fsl_law.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mach-mpc85xx/fsl_law.c b/arch/powerpc/mach-mpc85xx/fsl_law.c
index 2254c92544..e3c765f30f 100644
--- a/arch/powerpc/mach-mpc85xx/fsl_law.c
+++ b/arch/powerpc/mach-mpc85xx/fsl_law.c
@@ -81,7 +81,7 @@ static void fsl_set_next_law(phys_addr_t addr, enum law_size sz,
static void fsl_set_last_law(phys_addr_t addr, enum law_size sz,
enum law_trgt_if id)
{
- u32 idx;
+ int idx;
for (idx = (FSL_HW_NUM_LAWS - 1); idx >= 0; idx--) {
if (fsl_is_free_law(idx)) {