[PATCH] swsusp warning fix
kernel/power/swap.c: In function 'swsusp_write': kernel/power/swap.c:275: warning: 'start' may be used uninitialized in this function gcc isn't smart enough, so help it. Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
95018f7c94
commit
712f403af6
@ -263,7 +263,6 @@ int swsusp_write(void)
|
|||||||
struct swap_map_handle handle;
|
struct swap_map_handle handle;
|
||||||
struct snapshot_handle snapshot;
|
struct snapshot_handle snapshot;
|
||||||
struct swsusp_info *header;
|
struct swsusp_info *header;
|
||||||
unsigned long start;
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if ((error = swsusp_swap_check())) {
|
if ((error = swsusp_swap_check())) {
|
||||||
@ -281,17 +280,18 @@ int swsusp_write(void)
|
|||||||
}
|
}
|
||||||
error = get_swap_writer(&handle);
|
error = get_swap_writer(&handle);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
start = handle.cur_swap;
|
unsigned long start = handle.cur_swap;
|
||||||
error = swap_write_page(&handle, header);
|
error = swap_write_page(&handle, header);
|
||||||
}
|
|
||||||
if (!error)
|
if (!error)
|
||||||
error = save_image(&handle, &snapshot, header->pages - 1);
|
error = save_image(&handle, &snapshot,
|
||||||
|
header->pages - 1);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
flush_swap_writer(&handle);
|
flush_swap_writer(&handle);
|
||||||
printk("S");
|
printk("S");
|
||||||
error = mark_swapfiles(swp_entry(root_swap, start));
|
error = mark_swapfiles(swp_entry(root_swap, start));
|
||||||
printk("|\n");
|
printk("|\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (error)
|
if (error)
|
||||||
free_all_swap_pages(root_swap, handle.bitmap);
|
free_all_swap_pages(root_swap, handle.bitmap);
|
||||||
release_swap_writer(&handle);
|
release_swap_writer(&handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user