mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/topology: remove unneeded do while loop in cpu_attach_domain()
@ 2023-06-17  8:19 Miaohe Lin
  2023-06-18 16:32 ` Chen Yu
  2023-06-20 14:11 ` Peter Zijlstra
  0 siblings, 2 replies; 8+ messages in thread
From: Miaohe Lin @ 2023-06-17  8:19 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, bristot, vschneid,
	linux-kernel, linmiaohe

When sg != sd->groups, the do while loop would cause deadloop here. But
that won't occur because sg is always equal to sd->groups now. Remove
this unneeded do while loop.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 kernel/sched/topology.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index ca4472281c28..9010c93c3fdb 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -750,10 +750,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
 			 * domain for convenience. Clear such flags since
 			 * the child is being destroyed.
 			 */
-			do {
-				sg->flags = 0;
-			} while (sg != sd->groups);
-
+			sg->flags = 0;
 			sd->child = NULL;
 		}
 	}
-- 
2.27.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-12 18:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-17  8:19 [PATCH] sched/topology: remove unneeded do while loop in cpu_attach_domain() Miaohe Lin
2023-06-18 16:32 ` Chen Yu
2023-06-20 14:11 ` Peter Zijlstra
2023-06-21  2:53   ` Miaohe Lin
2023-06-21 13:11     ` Ricardo Neri
2023-06-21 18:57       ` Ricardo Neri
2023-06-25  1:59         ` Miaohe Lin
2023-07-12 18:33           ` Ricardo Neri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome