Thread (2 messages) 2 messages, 2 authors, 2021-01-11

Re: [PATCH] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu

From: Alexander Sverdlin <hidden>
Date: 2021-01-11 12:00:05
Also in: lkml

Hello Menglong!

Thank you for the fix! A small correction below:

On 11/01/2021 12:36, menglong8.dong@gmail.com wrote:
From: Menglong Dong <redacted>

The type of 'r' in octeon_irq_init_ciu is 'unsigned int', so 'r < 0'
can't be true.

Fix this by change the type of 'r' and 'i' from 'unsigned int'
to 'int'. As 'i' won't be negative, this change works.

Fixes: 64b139f97c01("MIPS: OCTEON: irq: add CIB and other fixes")
The patch actually fixes my commit 99fbc70f8547
("MIPS: Octeon: irq: Alloc desc before configuring IRQ").
With "Fixes:" tag corrected, you can put my

Reviewed-by: Alexander Sverdlin <redacted>
quoted hunk ↗ jump to hunk
Signed-off-by: Menglong Dong <redacted>
---
 arch/mips/cavium-octeon/octeon-irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index bd47e15d02c7..be5d4afcd30f 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -1444,7 +1444,7 @@ static void octeon_irq_setup_secondary_ciu2(void)
 static int __init octeon_irq_init_ciu(
 	struct device_node *ciu_node, struct device_node *parent)
 {
-	unsigned int i, r;
+	int i, r;
 	struct irq_chip *chip;
 	struct irq_chip *chip_edge;
 	struct irq_chip *chip_mbox;
-- 
Best regards,
Alexander Sverdlin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help