Commit 91d9674
committed
of: fix sparse warnings in of_find_next_cache_node
sparse gives a warning that 'handle' is not a __be32:
../drivers/of/base.c:2261:61: warning: incorrect type in argument 1 (different base types)
../drivers/of/base.c:2261:61: expected restricted __be32 const [usertype] *p
../drivers/of/base.c:2261:61: got unsigned int const [usertype] *[assigned] handle
We could just change the type, but the code can be improved by using
of_parse_phandle instead of open coding it with of_get_property and
of_find_node_by_phandle.
Signed-off-by: Rob Herring <robh@kernel.org>1 parent 8756cd1 commit 91d9674
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2250 | 2250 | | |
2251 | 2251 | | |
2252 | 2252 | | |
2253 | | - | |
2254 | | - | |
| 2253 | + | |
2255 | 2254 | | |
2256 | | - | |
2257 | | - | |
2258 | | - | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2259 | 2258 | | |
2260 | | - | |
2261 | | - | |
| 2259 | + | |
| 2260 | + | |
2262 | 2261 | | |
2263 | 2262 | | |
2264 | 2263 | | |
| |||
0 commit comments