mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH -mm 6/6] cpu_relax(): ptrace.c coding style fix
Date: Wed, 21 Jun 2006 23:00:46 +0200	[thread overview]
Message-ID: <20060621210046.GF22516@rhlx01.fht-esslingen.de> (raw)


Fix existing cpu_relax() loop to have proper kernel style.


Tested on 2.6.17-mm1.

Signed-off-by: Andreas Mohr <andi@lisas.de>


diff -urN linux-2.6.17-mm1.orig/kernel/ptrace.c linux-2.6.17-mm1.my/kernel/ptrace.c
--- linux-2.6.17-mm1.orig/kernel/ptrace.c	2006-06-21 14:28:20.000000000 +0200
+++ linux-2.6.17-mm1.my/kernel/ptrace.c	2006-06-21 14:43:24.000000000 +0200
@@ -182,9 +182,8 @@
 	if (!write_trylock(&tasklist_lock)) {
 		local_irq_enable();
 		task_unlock(task);
-		do {
+		while (!write_can_lock(&tasklist_lock))
 			cpu_relax();
-		} while (!write_can_lock(&tasklist_lock));
 		goto repeat;
 	}
 

             reply	other threads:[~2006-06-21 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 21:00 Andreas Mohr [this message]
2006-06-22 14:32 ` Nathan Lynch
2006-06-22 15:53   ` Andreas Mohr
2006-06-22 15:08 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060621210046.GF22516@rhlx01.fht-esslingen.de \
    --to=andi@rhlx01.fht-esslingen.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®