Skip to content

Commit dcf6230

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
timers/migration: Simplify top level detection on group setup
Having a single group on a given level is enough to know this is the top level, because a root has to have at least two children, unless that root is the only group and the children are actual CPUs. Simplify the test in tmigr_setup_groups() accordingly. Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 3ec9557 commit dcf6230

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/time/timer_migration.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,9 +1624,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
16241624
* be different from tmigr_hierarchy_levels, contains only a
16251625
* single group.
16261626
*/
1627-
if (group->parent || i == tmigr_hierarchy_levels ||
1628-
(list_empty(&tmigr_level_list[i]) &&
1629-
list_is_singular(&tmigr_level_list[i - 1])))
1627+
if (group->parent || list_is_singular(&tmigr_level_list[i - 1]))
16301628
break;
16311629

16321630
} while (i < tmigr_hierarchy_levels);

0 commit comments

Comments
 (0)