From f2f2cf07a61e9c170ab8d65e1e054f0131a84e2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 14 May 2020 16:23:21 +0200 Subject: [PATCH] bcm63xx: periph_intc: fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit drivers/irqchip/irq-bcm6345-periph.c: In function 'bcm6345_periph_irq_handle': drivers/irqchip/irq-bcm6345-periph.c:55:21: warning: 'block' may be used uninitialized in this function [-Wmaybe-uninitialized] struct intc_block *block; ^~~~~ Signed-off-by: Álvaro Fernández Rojas --- ...m6345-periph-fix-block-uninitialized.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 target/linux/bcm63xx/patches-5.4/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch diff --git a/target/linux/bcm63xx/patches-5.4/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch b/target/linux/bcm63xx/patches-5.4/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch new file mode 100644 index 00000000000..60a645e1bff --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch @@ -0,0 +1,20 @@ +--- a/drivers/irqchip/irq-bcm6345-periph.c ++++ b/drivers/irqchip/irq-bcm6345-periph.c +@@ -52,7 +52,7 @@ static void bcm6345_periph_irq_handle(st + { + struct intc_data *data = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); +- struct intc_block *block; ++ struct intc_block *block = NULL; + unsigned int irq = irq_desc_get_irq(desc); + unsigned int idx; + +@@ -62,7 +62,7 @@ static void bcm6345_periph_irq_handle(st + if (irq == data->block[idx].parent_irq) + block = &data->block[idx]; + +- for (idx = 0; idx < data->num_words; idx++) { ++ for (idx = 0; block && idx < data->num_words; idx++) { + int base = idx * IRQS_PER_WORD; + unsigned long pending; + int hw_irq; -- 2.30.2