linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu
@ 2021-01-11 13:27 menglong8.dong
  2021-01-13 10:07 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: menglong8.dong @ 2021-01-11 13:27 UTC (permalink / raw)
  To: alexander.sverdlin, paulburton
  Cc: tsbogend, gustavo, dong.menglong, colin.king, linux-mips, linux-kernel

From: Menglong Dong <dong.menglong@zte.com.cn>

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: 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring IRQ")
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
---
v2:
- change 'Fixes' from 64b139f97c01 to 99fbc70f8547
---
 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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu
  2021-01-11 13:27 [PATCH v2] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu menglong8.dong
@ 2021-01-13 10:07 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-13 10:07 UTC (permalink / raw)
  To: menglong8.dong
  Cc: alexander.sverdlin, paulburton, gustavo, dong.menglong,
	colin.king, linux-mips, linux-kernel

On Mon, Jan 11, 2021 at 05:27:25AM -0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
> 
> 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: 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring IRQ")
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> ---
> v2:
> - change 'Fixes' from 64b139f97c01 to 99fbc70f8547
> ---
>  arch/mips/cavium-octeon/octeon-irq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-13 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 13:27 [PATCH v2] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu menglong8.dong
2021-01-13 10:07 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).