From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: swsusp: fix comments
Date: Thu, 15 Sep 2005 08:54:12 +0200 [thread overview]
Message-ID: <20050915065412.GC2726@elf.ucw.cz> (raw)
Fix comments in swsusp.
Signed-off-by: Pavel Machek <pavel@suse.cz>
---
commit eda1a89e8ae458d17de4f876615cec4da88b72d0
tree 44ec95702f549ba9570de6746c4eaad3e42091bb
parent ec2999be998bb1981287b20dd656214956e45be8
author <pavel@amd.(none)> Thu, 15 Sep 2005 08:53:30 +0200
committer <pavel@amd.(none)> Thu, 15 Sep 2005 08:53:30 +0200
kernel/power/power.h | 2 +-
kernel/power/swsusp.c | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/power/power.h b/kernel/power/power.h
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -1,7 +1,7 @@
#include <linux/suspend.h>
#include <linux/utsname.h>
-/* With SUSPEND_CONSOLE defined, it suspend looks *really* cool, but
+/* With SUSPEND_CONSOLE defined suspend looks *really* cool, but
we probably do not take enough locks for switching consoles, etc,
so bad things might happen.
*/
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -363,7 +363,7 @@ static void lock_swapdevices(void)
}
/**
- * write_swap_page - Write one page to a fresh swap location.
+ * write_page - Write one page to a fresh swap location.
* @addr: Address we're writing.
* @loc: Place to store the entry we used.
*
@@ -863,6 +863,9 @@ static int alloc_image_pages(void)
return 0;
}
+/* Free pages we allocated for suspend. Suspend pages are alocated
+ * before atomic copy, so we need to free them after resume.
+ */
void swsusp_free(void)
{
BUG_ON(PageNosave(virt_to_page(pagedir_save)));
@@ -1213,8 +1216,9 @@ static struct pbe * swsusp_pagedir_reloc
free_pagedir(pblist);
free_eaten_memory();
pblist = NULL;
- }
- else
+ /* Is this even worth handling? It should never ever happen, and we
+ have just lost user's state, anyway... */
+ } else
printk("swsusp: Relocated %d pages\n", rel);
return pblist;
--
if you have sharp zaurus hardware you don't need... you know my address
reply other threads:[~2005-09-15 6:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050915065412.GC2726@elf.ucw.cz \
--to=pavel@ucw.cz \
--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®