diff options
author | Rob Herring <robh@kernel.org> | 2017-05-04 12:56:12 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-05-04 14:01:13 -0500 |
commit | 17a70355ea576843a7ac851f1db26872a50b2850 (patch) | |
tree | bc3ca7262bb9ff371698a2f65e9e3cca0571a2fc /drivers/of/of_reserved_mem.c | |
parent | eb3100365791b06242b8bb5c3c2854ba41dabfbc (diff) | |
download | blackbird-op-linux-17a70355ea576843a7ac851f1db26872a50b2850.tar.gz blackbird-op-linux-17a70355ea576843a7ac851f1db26872a50b2850.zip |
of: fix sparse warnings in fdt, irq, reserved mem, and resolver code
sparse generates the following warnings in drivers/of/:
../drivers/of/fdt.c:63:36: warning: cast to restricted __be32
../drivers/of/fdt.c:68:33: warning: cast to restricted __be32
../drivers/of/irq.c:105:88: warning: incorrect type in initializer (different base types)
../drivers/of/irq.c:105:88: expected restricted __be32
../drivers/of/irq.c:105:88: got int
../drivers/of/irq.c:526:35: warning: incorrect type in assignment (different modifiers)
../drivers/of/irq.c:526:35: expected int ( *const [usertype] irq_init_cb )( ... )
../drivers/of/irq.c:526:35: got void const *const data
../drivers/of/of_reserved_mem.c:200:50: warning: incorrect type in initializer (different modifiers)
../drivers/of/of_reserved_mem.c:200:50: expected int ( *[usertype] initfn )( ... )
../drivers/of/of_reserved_mem.c:200:50: got void const *const data
../drivers/of/resolver.c:95:42: warning: incorrect type in assignment (different base types)
../drivers/of/resolver.c:95:42: expected unsigned int [unsigned] [usertype] <noident>
../drivers/of/resolver.c:95:42: got restricted __be32 [usertype] <noident>
All these are harmless type mismatches fixed by adjusting the types.
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
-rw-r--r-- | drivers/of/of_reserved_mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index d507c3569a88..4dec07ea510f 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -197,7 +197,7 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem) const struct of_device_id *i; for (i = __reservedmem_of_table; i < &__rmem_of_table_sentinel; i++) { - reservedmem_of_init_fn initfn = i->data; + int const (*initfn)(struct reserved_mem *rmem) = i->data; const char *compat = i->compatible; if (!of_flat_dt_is_compatible(rmem->fdt_node, compat)) |