Make topology.h macros more readable
The three parts of the "for" loops are more readable than before. The
way they are written now, it is clear which are the initial and final
values of the loop controlling variables.
Also, parentheses were added only to those macro parameters that can
receive expressions as arguments. E.g. in for_each_cpu(cpu), "cpu" must
receive a variable name, it cannot receive an expression. So there was
no reason to clutter the macro body with unnecessary parentheses
wherever "cpu" parameter appears. Parentheses were added only around
those parameters that might receive expressions.
The parameters in for_each_cpu_in_power_domain were swapped. This was
done for consistency with the other two macros. Thus, the first
parameter is always the iterating variable, in all macros.
Change-Id: I18831237840e9cfa738a48dbe7f1ec449c89f7af
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
1 file changed