Commit d2e41518 authored by Kim Phillips's avatar Kim Phillips Committed by Rob Herring

of/irq: sparse fixes

drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer
drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer
drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers)
drivers/of/irq.c:470:37:    expected int ( *[usertype] irq_init_cb )( ... )
drivers/of/irq.c:470:37:    got void const *const data
drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types)

drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types)
drivers/of/of_pci_irq.c:91:40:    expected unsigned int const [usertype] *intspec
drivers/of/of_pci_irq.c:91:40:    got restricted __be32 *<noident>
drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types)
drivers/of/of_pci_irq.c:91:53:    expected unsigned int const [usertype] *addr
drivers/of/of_pci_irq.c:91:53:    got restricted __be32 *<noident>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent 47b1e689
...@@ -192,11 +192,13 @@ int of_irq_map_raw(struct device_node *parent, const __be32 *intspec, ...@@ -192,11 +192,13 @@ int of_irq_map_raw(struct device_node *parent, const __be32 *intspec,
/* Compare specifiers */ /* Compare specifiers */
match = 1; match = 1;
for (i = 0; i < addrsize && match; ++i) { for (i = 0; i < addrsize && match; ++i) {
u32 mask = imask ? imask[i] : 0xffffffffu; __be32 mask = imask ? imask[i]
: cpu_to_be32(0xffffffffu);
match = ((addr[i] ^ imap[i]) & mask) == 0; match = ((addr[i] ^ imap[i]) & mask) == 0;
} }
for (; i < (addrsize + intsize) && match; ++i) { for (; i < (addrsize + intsize) && match; ++i) {
u32 mask = imask ? imask[i] : 0xffffffffu; __be32 mask = imask ? imask[i]
: cpu_to_be32(0xffffffffu);
match = match =
((intspec[i-addrsize] ^ imap[i]) & mask) == 0; ((intspec[i-addrsize] ^ imap[i]) & mask) == 0;
} }
...@@ -465,7 +467,7 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -465,7 +467,7 @@ void __init of_irq_init(const struct of_device_id *matches)
pr_debug("of_irq_init: init %s @ %p, parent %p\n", pr_debug("of_irq_init: init %s @ %p, parent %p\n",
match->compatible, match->compatible,
desc->dev, desc->interrupt_parent); desc->dev, desc->interrupt_parent);
irq_init_cb = match->data; irq_init_cb = (of_irq_init_cb_t)match->data;
ret = irq_init_cb(desc->dev, desc->interrupt_parent); ret = irq_init_cb(desc->dev, desc->interrupt_parent);
if (ret) { if (ret) {
kfree(desc); kfree(desc);
......
...@@ -58,8 +58,8 @@ static inline int of_irq_map_oldworld(struct device_node *device, int index, ...@@ -58,8 +58,8 @@ static inline int of_irq_map_oldworld(struct device_node *device, int index,
#endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ #endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, extern int of_irq_map_raw(struct device_node *parent, const __be32 *intspec,
u32 ointsize, const u32 *addr, u32 ointsize, const __be32 *addr,
struct of_irq *out_irq); struct of_irq *out_irq);
extern int of_irq_map_one(struct device_node *device, int index, extern int of_irq_map_one(struct device_node *device, int index,
struct of_irq *out_irq); struct of_irq *out_irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment