From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: pm list <linux-pm@lists.linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Subject: [PATCH 3/3] Freezer: Remove redundant check in try_to_freeze_tasks
Date: Sat, 26 May 2007 23:29:07 +0200 [thread overview]
Message-ID: <200705262329.07758.rjw@sisk.pl> (raw)
In-Reply-To: <200705262317.48604.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
We don't need to check if todo is positive before calling time_after() in
try_to_freeze_tasks(), because if todo is zero at this point, the loop will
be broken anyway due to the while () condition being false.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.22-rc2/kernel/power/process.c
===================================================================
--- linux-2.6.22-rc2.orig/kernel/power/process.c
+++ linux-2.6.22-rc2/kernel/power/process.c
@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(int freez
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
yield(); /* Yield is okay here */
- if (todo && time_after(jiffies, end_time))
+ if (time_after(jiffies, end_time))
break;
} while (todo);
next prev parent reply other threads:[~2007-05-26 21:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-26 21:17 [PATCH 0/3] Freezer cleanups Rafael J. Wysocki
2007-05-26 21:20 ` [PATCH 1/3] Freezer: Use __set_current_state in refrigerator Rafael J. Wysocki
2007-05-26 23:15 ` Pavel Machek
2007-05-26 21:24 ` [PATCH 2/3] Freezer: Return int from freeze_processes Rafael J. Wysocki
2007-05-26 23:17 ` Pavel Machek
2007-05-26 21:29 ` Rafael J. Wysocki [this message]
2007-05-26 23:18 ` [PATCH 3/3] Freezer: Remove redundant check in try_to_freeze_tasks 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=200705262329.07758.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/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