LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] IA64: use goto to jump out do/while_each_thread
@ 2008-04-01  4:29 Li Zefan
  0 siblings, 0 replies; only message in thread
From: Li Zefan @ 2008-04-01  4:29 UTC (permalink / raw)
  To: tony.luck; +Cc: linux-ia64, LKML

do_each_thread/while_each_thread is a double loop, so
should use 'goto' rather than 'break' to break out
the loop.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 arch/ia64/kernel/perfmon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index a2aabfd..d1d24f4 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -4204,10 +4204,10 @@ pfm_check_task_exist(pfm_context_t *ctx)
 	do_each_thread (g, t) {
 		if (t->thread.pfm_context == ctx) {
 			ret = 0;
-			break;
+			goto out;
 		}
 	} while_each_thread (g, t);
-
+out:
 	read_unlock(&tasklist_lock);
 
 	DPRINT(("pfm_check_task_exist: ret=%d ctx=%p\n", ret, ctx));
-- 
1.5.4.rc3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-01  4:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01  4:29 [PATCH] IA64: use goto to jump out do/while_each_thread Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).