Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1593332
| From | Franck Demathieu <fdemathieu@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] irqchip: crossbar: Fix incorrect type of register size |
| Date | 2017-03-06 14:50 +0100 |
| Message-ID | <ti1bs-uP-37@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The 'size' variable is unsigned according to the dt-bindings.
As this variable is used as integer in other places, create a new variable
that allows to fix the following sparse issue (-Wtypesign):
drivers/irqchip/irq-crossbar.c:279:52: warning: incorrect type in argument 3 (different signedness)
drivers/irqchip/irq-crossbar.c:279:52: expected unsigned int [usertype] *out_value
drivers/irqchip/irq-crossbar.c:279:52: got int *<noident>
Signed-off-by: Franck Demathieu <fdemathieu@gmail.com>
---
drivers/irqchip/irq-crossbar.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c
index 05bbf17..1070b7b 100644
--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -199,7 +199,7 @@ static const struct irq_domain_ops crossbar_domain_ops = {
static int __init crossbar_of_init(struct device_node *node)
{
int i, size, reserved = 0;
- u32 max = 0, entry;
+ u32 max = 0, entry, reg_size;
const __be32 *irqsr;
int ret = -ENOMEM;
@@ -276,9 +276,9 @@ static int __init crossbar_of_init(struct device_node *node)
if (!cb->register_offsets)
goto err_irq_map;
- of_property_read_u32(node, "ti,reg-size", &size);
+ of_property_read_u32(node, "ti,reg-size", ®_size);
- switch (size) {
+ switch (reg_size) {
case 1:
cb->write = crossbar_writeb;
break;
@@ -304,7 +304,7 @@ static int __init crossbar_of_init(struct device_node *node)
continue;
cb->register_offsets[i] = reserved;
- reserved += size;
+ reserved += reg_size;
}
of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
--
2.10.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] irqchip: crossbar: Fix incorrect type of register size Franck Demathieu <fdemathieu@gmail.com> - 2017-03-06 14:50 +0100
Re: [PATCH] irqchip: crossbar: Fix incorrect type of register size Marc Zyngier <marc.zyngier@arm.com> - 2017-03-06 16:10 +0100
Re: [PATCH] irqchip: crossbar: Fix incorrect type of register size Franck Demathieu <fdemathieu@gmail.com> - 2017-03-06 18:00 +0100
csiph-web