[PATCH 15/15] powerpc: law: use signed type to allow error checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 arch/powerpc/mach-mpc85xx/fsl_law.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)) {
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux