* [PATCH] irqchip/gicv3-its: comfort build warnings
@ 2015-09-02 5:16 Alex Shi
[not found] ` <55E6AACD.3070904@arm.com>
0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2015-09-02 5:16 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Marc Zyngier,
open list:IRQCHIP DRIVERS
Cc: Alex Shi
There are some warnings in gicv3-its.
It looks like they are set in its_lpi_alloc_chunks(), but
in fact, both of them(lpi_base/nr_lpis) still have some chances
as unset variables. Anyway to comfort gcc if it's not a issue.
drivers/irqchip/irq-gic-v3-its.c: In function ‘its_msi_prepare’:
drivers/irqchip/irq-gic-v3-its.c:1148:26: warning: ‘lpi_base’ may be used uninitialized in this function [-Wmaybe-uninitialized]
dev->event_map.lpi_base = lpi_base;
^
drivers/irqchip/irq-gic-v3-its.c:1116:6: note: ‘lpi_base’ was declared here
int lpi_base;
^
drivers/irqchip/irq-gic-v3-its.c:1149:25: warning: ‘nr_lpis’ may be used uninitialized in this function [-Wmaybe-uninitialized]
dev->event_map.nr_lpis = nr_lpis;
^
drivers/irqchip/irq-gic-v3-its.c:1117:6: note: ‘nr_lpis’ was declared here
int nr_lpis;
^
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
---
drivers/irqchip/irq-gic-v3-its.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 26b55c5..0f0af18 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1113,8 +1113,8 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
unsigned long flags;
u16 *col_map = NULL;
void *itt;
- int lpi_base;
- int nr_lpis;
+ int lpi_base = 0;
+ int nr_lpis = 0;
int nr_ites;
int sz;
--
2.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-02 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 5:16 [PATCH] irqchip/gicv3-its: comfort build warnings Alex Shi
[not found] ` <55E6AACD.3070904@arm.com>
2015-09-02 8:57 ` Alex Shi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox