Commit 2e4d5822 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] swsusp: cleanup whitespace

The following patch cleans up whitespace in swsusp.c (a bit):

- removes any trailing whitespace

- adds spaces after if, for, for_each_pbe, for_each_zone etc., wherever
  necessary.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8f9bdf15
......@@ -179,13 +179,13 @@ static int swsusp_swap_check(void) /* This is called before saving image */
root_swap = 0xFFFF;
swap_list_lock();
for(i=0; i<MAX_SWAPFILES; i++) {
for (i=0; i<MAX_SWAPFILES; i++) {
if (swap_info[i].flags == 0) {
swapfile_used[i]=SWAPFILE_UNUSED;
} else {
if(!len) {
if (!len) {
printk(KERN_WARNING "resume= option should be used to set suspend device" );
if(root_swap == 0xFFFF) {
if (root_swap == 0xFFFF) {
swapfile_used[i] = SWAPFILE_SUSPEND;
root_swap = i;
} else
......@@ -216,8 +216,8 @@ static void lock_swapdevices(void)
int i;
swap_list_lock();
for(i = 0; i< MAX_SWAPFILES; i++)
if(swapfile_used[i] == SWAPFILE_IGNORED) {
for (i = 0; i< MAX_SWAPFILES; i++)
if (swapfile_used[i] == SWAPFILE_IGNORED) {
swap_info[i].flags ^= 0xFF;
}
swap_list_unlock();
......@@ -290,7 +290,7 @@ static int data_write(void)
mod = 1;
printk( "Writing data to swap (%d pages)... ", nr_copy_pages );
for_each_pbe(p, pagedir_nosave) {
for_each_pbe (p, pagedir_nosave) {
if (!(i%mod))
printk( "\b\b\b\b%3d%%", i / mod );
if ((error = write_page(p->address, &(p->swap_address))))
......@@ -370,7 +370,7 @@ static int write_pagedir(void)
struct pbe * pbe;
printk( "Writing pagedir...");
for_each_pb_page(pbe, pagedir_nosave) {
for_each_pb_page (pbe, pagedir_nosave) {
if ((error = write_page((unsigned long)pbe, &swsusp_info.pagedir[n++])))
return error;
}
......@@ -472,7 +472,7 @@ static int save_highmem(void)
int res = 0;
pr_debug("swsusp: Saving Highmem\n");
for_each_zone(zone) {
for_each_zone (zone) {
if (is_highmem(zone))
res = save_highmem_zone(zone);
if (res)
......@@ -547,7 +547,7 @@ static void count_data_pages(void)
nr_copy_pages = 0;
for_each_zone(zone) {
for_each_zone (zone) {
if (is_highmem(zone))
continue;
mark_free_pages(zone);
......@@ -564,7 +564,7 @@ static void copy_data_pages(void)
struct pbe * pbe = pagedir_nosave;
pr_debug("copy_data_pages(): pages to copy: %d\n", nr_copy_pages);
for_each_zone(zone) {
for_each_zone (zone) {
if (is_highmem(zone))
continue;
mark_free_pages(zone);
......@@ -702,7 +702,7 @@ static void free_image_pages(void)
{
struct pbe * p;
for_each_pbe(p, pagedir_save) {
for_each_pbe (p, pagedir_save) {
if (p->address) {
ClearPageNosave(virt_to_page(p->address));
free_page(p->address);
......@@ -719,7 +719,7 @@ static int alloc_image_pages(void)
{
struct pbe * p;
for_each_pbe(p, pagedir_save) {
for_each_pbe (p, pagedir_save) {
p->address = get_zeroed_page(GFP_ATOMIC | __GFP_COLD);
if (!p->address)
return -ENOMEM;
......@@ -1030,7 +1030,7 @@ static struct pbe * swsusp_pagedir_relocate(struct pbe *pblist)
/* Set page flags */
for_each_zone(zone) {
for_each_zone (zone) {
for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
SetPageNosaveFree(pfn_to_page(zone_pfn +
zone->zone_start_pfn));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment