diff options
author | Franck Demathieu <fdemathieu@gmail.com> | 2017-03-06 08:41:06 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-03-07 09:34:39 -0500 |
commit | 4b9de5da7e120c7f02395da729f0ec77ce7a6044 (patch) | |
tree | b16504a886d8f8814d859c6b4e991544e806d1a5 | |
parent | 90922a2d03d84de36bf8a9979d62580102f31a92 (diff) |
irqchip/crossbar: Fix incorrect type of register size
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>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | drivers/irqchip/irq-crossbar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 05bbf171df37..1070b7b959f2 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 = { | |||
199 | static int __init crossbar_of_init(struct device_node *node) | 199 | static int __init crossbar_of_init(struct device_node *node) |
200 | { | 200 | { |
201 | int i, size, reserved = 0; | 201 | int i, size, reserved = 0; |
202 | u32 max = 0, entry; | 202 | u32 max = 0, entry, reg_size; |
203 | const __be32 *irqsr; | 203 | const __be32 *irqsr; |
204 | int ret = -ENOMEM; | 204 | int ret = -ENOMEM; |
205 | 205 | ||
@@ -276,9 +276,9 @@ static int __init crossbar_of_init(struct device_node *node) | |||
276 | if (!cb->register_offsets) | 276 | if (!cb->register_offsets) |
277 | goto err_irq_map; | 277 | goto err_irq_map; |
278 | 278 | ||
279 | of_property_read_u32(node, "ti,reg-size", &size); | 279 | of_property_read_u32(node, "ti,reg-size", ®_size); |
280 | 280 | ||
281 | switch (size) { | 281 | switch (reg_size) { |
282 | case 1: | 282 | case 1: |
283 | cb->write = crossbar_writeb; | 283 | cb->write = crossbar_writeb; |
284 | break; | 284 | break; |
@@ -304,7 +304,7 @@ static int __init crossbar_of_init(struct device_node *node) | |||
304 | continue; | 304 | continue; |
305 | 305 | ||
306 | cb->register_offsets[i] = reserved; | 306 | cb->register_offsets[i] = reserved; |
307 | reserved += size; | 307 | reserved += reg_size; |
308 | } | 308 | } |
309 | 309 | ||
310 | of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map); | 310 | of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map); |