提交 47b90ffe 编写于 作者: P Pavel Machek 提交者: Linus Torvalds

[PATCH] swsusp: remove unused variable

Remove unused variable, and make code less evil that way.  Fix whitespace
around for-loop-like macro.
Signed-off-by: NPavel Machek <pavel@suse.cz>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 dc19d507
...@@ -85,18 +85,11 @@ unsigned int nr_copy_pages __nosavedata = 0; ...@@ -85,18 +85,11 @@ unsigned int nr_copy_pages __nosavedata = 0;
/* Suspend pagedir is allocated before final copy, therefore it /* Suspend pagedir is allocated before final copy, therefore it
must be freed after resume must be freed after resume
Warning: this is evil. There are actually two pagedirs at time of
resume. One is "pagedir_save", which is empty frame allocated at
time of suspend, that must be freed. Second is "pagedir_nosave",
allocated at time of resume, that travels through memory not to
collide with anything.
Warning: this is even more evil than it seems. Pagedirs this file Warning: this is even more evil than it seems. Pagedirs this file
talks about are completely different from page directories used by talks about are completely different from page directories used by
MMU hardware. MMU hardware.
*/ */
suspend_pagedir_t *pagedir_nosave __nosavedata = NULL; suspend_pagedir_t *pagedir_nosave __nosavedata = NULL;
suspend_pagedir_t *pagedir_save;
#define SWSUSP_SIG "S1SUSPEND" #define SWSUSP_SIG "S1SUSPEND"
...@@ -385,7 +378,7 @@ static void data_free(void) ...@@ -385,7 +378,7 @@ static void data_free(void)
swp_entry_t entry; swp_entry_t entry;
struct pbe *p; struct pbe *p;
for_each_pbe(p, pagedir_nosave) { for_each_pbe (p, pagedir_nosave) {
entry = p->swap_address; entry = p->swap_address;
if (entry.val) if (entry.val)
swap_free(entry); swap_free(entry);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册