diff options
author | Pavel Machek <pavel@ucw.cz> | 2005-11-07 03:58:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:29 -0500 |
commit | dc19d507b17135069d9c5d6093d4458dc60e1861 (patch) | |
tree | a5913fbd1185b3af5463a90aca59fe902aba2f73 /kernel/power/snapshot.c | |
parent | 36fabc248e5466e3f28897819b0400b5cdbb8dc6 (diff) |
[PATCH] swsusp cleanups
This cleans spaces between * and pointer up, and adds "int" in "unsigned
int".
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 42a628704398..723f5179883e 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -168,9 +168,8 @@ static unsigned count_data_pages(void) | |||
168 | { | 168 | { |
169 | struct zone *zone; | 169 | struct zone *zone; |
170 | unsigned long zone_pfn; | 170 | unsigned long zone_pfn; |
171 | unsigned n; | 171 | unsigned int n = 0; |
172 | 172 | ||
173 | n = 0; | ||
174 | for_each_zone (zone) { | 173 | for_each_zone (zone) { |
175 | if (is_highmem(zone)) | 174 | if (is_highmem(zone)) |
176 | continue; | 175 | continue; |
@@ -250,10 +249,10 @@ static inline void fill_pb_page(struct pbe *pbpage) | |||
250 | * of memory pages allocated with alloc_pagedir() | 249 | * of memory pages allocated with alloc_pagedir() |
251 | */ | 250 | */ |
252 | 251 | ||
253 | void create_pbe_list(struct pbe *pblist, unsigned nr_pages) | 252 | void create_pbe_list(struct pbe *pblist, unsigned int nr_pages) |
254 | { | 253 | { |
255 | struct pbe *pbpage, *p; | 254 | struct pbe *pbpage, *p; |
256 | unsigned num = PBES_PER_PAGE; | 255 | unsigned int num = PBES_PER_PAGE; |
257 | 256 | ||
258 | for_each_pb_page (pbpage, pblist) { | 257 | for_each_pb_page (pbpage, pblist) { |
259 | if (num >= nr_pages) | 258 | if (num >= nr_pages) |
@@ -293,9 +292,9 @@ static void *alloc_image_page(void) | |||
293 | * On each page we set up a list of struct_pbe elements. | 292 | * On each page we set up a list of struct_pbe elements. |
294 | */ | 293 | */ |
295 | 294 | ||
296 | struct pbe *alloc_pagedir(unsigned nr_pages) | 295 | struct pbe *alloc_pagedir(unsigned int nr_pages) |
297 | { | 296 | { |
298 | unsigned num; | 297 | unsigned int num; |
299 | struct pbe *pblist, *pbe; | 298 | struct pbe *pblist, *pbe; |
300 | 299 | ||
301 | if (!nr_pages) | 300 | if (!nr_pages) |
@@ -329,7 +328,7 @@ void swsusp_free(void) | |||
329 | for_each_zone(zone) { | 328 | for_each_zone(zone) { |
330 | for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) | 329 | for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) |
331 | if (pfn_valid(zone_pfn + zone->zone_start_pfn)) { | 330 | if (pfn_valid(zone_pfn + zone->zone_start_pfn)) { |
332 | struct page * page; | 331 | struct page *page; |
333 | page = pfn_to_page(zone_pfn + zone->zone_start_pfn); | 332 | page = pfn_to_page(zone_pfn + zone->zone_start_pfn); |
334 | if (PageNosave(page) && PageNosaveFree(page)) { | 333 | if (PageNosave(page) && PageNosaveFree(page)) { |
335 | ClearPageNosave(page); | 334 | ClearPageNosave(page); |
@@ -348,7 +347,7 @@ void swsusp_free(void) | |||
348 | * free pages. | 347 | * free pages. |
349 | */ | 348 | */ |
350 | 349 | ||
351 | static int enough_free_mem(unsigned nr_pages) | 350 | static int enough_free_mem(unsigned int nr_pages) |
352 | { | 351 | { |
353 | pr_debug("swsusp: available memory: %u pages\n", nr_free_pages()); | 352 | pr_debug("swsusp: available memory: %u pages\n", nr_free_pages()); |
354 | return nr_free_pages() > (nr_pages + PAGES_FOR_IO + | 353 | return nr_free_pages() > (nr_pages + PAGES_FOR_IO + |
@@ -356,7 +355,7 @@ static int enough_free_mem(unsigned nr_pages) | |||
356 | } | 355 | } |
357 | 356 | ||
358 | 357 | ||
359 | static struct pbe *swsusp_alloc(unsigned nr_pages) | 358 | static struct pbe *swsusp_alloc(unsigned int nr_pages) |
360 | { | 359 | { |
361 | struct pbe *pblist, *p; | 360 | struct pbe *pblist, *p; |
362 | 361 | ||
@@ -380,7 +379,7 @@ static struct pbe *swsusp_alloc(unsigned nr_pages) | |||
380 | 379 | ||
381 | asmlinkage int swsusp_save(void) | 380 | asmlinkage int swsusp_save(void) |
382 | { | 381 | { |
383 | unsigned nr_pages; | 382 | unsigned int nr_pages; |
384 | 383 | ||
385 | pr_debug("swsusp: critical section: \n"); | 384 | pr_debug("swsusp: critical section: \n"); |
386 | if (save_highmem()) { | 385 | if (save_highmem()) { |