sched: topology: Remove unnecessary ‘0’ values from nr_levels
PATCH 1/1 sched: topology: Remove unnecessary ‘0’ values from nr_levels
nr_levels is assigned first, so it does not need to initialize the assignment.
Signed-off-by Li kunyu <[email protected]>
--- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/topology.c +1 -1
@@ -1823,7 +1823,7 @@ void sched_init_numa(int offline_node) {struct sched_domain_topology_level *tl;unsigned long *distance_map; -int nr_levels =0 ; +int nr_levels;int i, j;int *distances;struct cpumask ***masks;
Signature · 1 line
2.18.2
Quoted 2 lines · Li kunyu
nr_levelsis assigned first, so it does not need to initialize the assignment.
In C there's no such thing as "initializing the assignment"...
Please write sensible changelogs that demonstrate an understanding of these principles.
Thanks,
Ingo