Messages in this thread Patch in this message | | | Date | Sun, 1 Aug 2004 21:55:28 -0700 (PDT) | From | Patrick Mochel <> | Subject | Re: [14/25] Merge pmdisk and swsusp |
| |
On Mon, 19 Jul 2004, Pavel Machek wrote:
> > +int swsusp_write_header(swp_entry_t * entry) > > +{ > > + return swsusp_write_page((unsigned long)&swsusp_info,entry); > > +} > > I do not think this function matches its documentation.
Heh, you're right. Patch below fixes that.
Pat
ChangeSet@1.1852, 2004-08-01 21:46:15-07:00, mochel@digitalimplant.org [swsusp] Kill unneeded write_header().
- Just inline and remove bad comment.
diff -Nru a/kernel/power/swsusp.c b/kernel/power/swsusp.c --- a/kernel/power/swsusp.c 2004-08-01 21:46:21 -07:00 +++ b/kernel/power/swsusp.c 2004-08-01 21:46:21 -07:00 @@ -336,32 +336,17 @@ dump_info(); }
-/** - * write_header - Fill and write the suspend header. - * @entry: Location of the last swap entry used. - * - * Allocate a page, fill header, write header. - * - * @entry is the location of the last pagedir entry written on - * entrance. On exit, it contains the location of the header. - */ - -static int write_header(swp_entry_t * entry) -{ - return write_page((unsigned long)&swsusp_info,entry); -} - - static int close_swap(void) { swp_entry_t entry; int error; - error = write_header(&entry);
- printk( "S" ); - if (!error) + error = write_page((unsigned long)&swsusp_info,&entry); + if (!error) { + printk( "S" ); error = mark_swapfiles(entry); - printk( "|\n" ); + printk( "|\n" ); + } return error; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |