Skip to content
Commit 662372e4 authored by Rob Herring's avatar Rob Herring
Browse files

of: restructure for_each macros to fix compile warnings



Commit 00b2c76a "include/linux/of.h: make for_each_child_of_node()
reference its args when CONFIG_OF=n" fixed warnings for unused
variables, but introduced variable "used uninitialized" warnings.
Simply initializing the variables would result in "set but not used"
warnings with W=1.

Fix both types of warnings by making all the for_each macros
unconditional and rely on the dummy static inline functions to
initialize and reference any variables.

Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
parent b2d960e4
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