diff options
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 12db1d2ad61f..a1300717dc3f 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -122,8 +122,8 @@ static struct swsusp_info swsusp_info; | |||
122 | static unsigned short swapfile_used[MAX_SWAPFILES]; | 122 | static unsigned short swapfile_used[MAX_SWAPFILES]; |
123 | static unsigned short root_swap; | 123 | static unsigned short root_swap; |
124 | 124 | ||
125 | static int write_page(unsigned long addr, swp_entry_t * loc); | 125 | static int write_page(unsigned long addr, swp_entry_t *loc); |
126 | static int bio_read_page(pgoff_t page_off, void * page); | 126 | static int bio_read_page(pgoff_t page_off, void *page); |
127 | 127 | ||
128 | static u8 key_iv[MAXKEY+MAXIV]; | 128 | static u8 key_iv[MAXKEY+MAXIV]; |
129 | 129 | ||
@@ -355,7 +355,7 @@ static void lock_swapdevices(void) | |||
355 | * This is a partial improvement, since we will at least return other | 355 | * This is a partial improvement, since we will at least return other |
356 | * errors, though we need to eventually fix the damn code. | 356 | * errors, though we need to eventually fix the damn code. |
357 | */ | 357 | */ |
358 | static int write_page(unsigned long addr, swp_entry_t * loc) | 358 | static int write_page(unsigned long addr, swp_entry_t *loc) |
359 | { | 359 | { |
360 | swp_entry_t entry; | 360 | swp_entry_t entry; |
361 | int error = 0; | 361 | int error = 0; |
@@ -383,7 +383,7 @@ static int write_page(unsigned long addr, swp_entry_t * loc) | |||
383 | static void data_free(void) | 383 | static void data_free(void) |
384 | { | 384 | { |
385 | swp_entry_t entry; | 385 | swp_entry_t entry; |
386 | struct pbe * p; | 386 | struct pbe *p; |
387 | 387 | ||
388 | for_each_pbe(p, pagedir_nosave) { | 388 | for_each_pbe(p, pagedir_nosave) { |
389 | entry = p->swap_address; | 389 | entry = p->swap_address; |
@@ -492,8 +492,8 @@ static void free_pagedir_entries(void) | |||
492 | static int write_pagedir(void) | 492 | static int write_pagedir(void) |
493 | { | 493 | { |
494 | int error = 0; | 494 | int error = 0; |
495 | unsigned n = 0; | 495 | unsigned int n = 0; |
496 | struct pbe * pbe; | 496 | struct pbe *pbe; |
497 | 497 | ||
498 | printk( "Writing pagedir..."); | 498 | printk( "Writing pagedir..."); |
499 | for_each_pb_page (pbe, pagedir_nosave) { | 499 | for_each_pb_page (pbe, pagedir_nosave) { |
@@ -543,7 +543,7 @@ static int write_suspend_image(void) | |||
543 | * We should only consider resume_device. | 543 | * We should only consider resume_device. |
544 | */ | 544 | */ |
545 | 545 | ||
546 | int enough_swap(unsigned nr_pages) | 546 | int enough_swap(unsigned int nr_pages) |
547 | { | 547 | { |
548 | struct sysinfo i; | 548 | struct sysinfo i; |
549 | 549 | ||
@@ -694,7 +694,7 @@ static int check_pagedir(struct pbe *pblist) | |||
694 | * restore from the loaded pages later. We relocate them here. | 694 | * restore from the loaded pages later. We relocate them here. |
695 | */ | 695 | */ |
696 | 696 | ||
697 | static struct pbe * swsusp_pagedir_relocate(struct pbe *pblist) | 697 | static struct pbe *swsusp_pagedir_relocate(struct pbe *pblist) |
698 | { | 698 | { |
699 | struct zone *zone; | 699 | struct zone *zone; |
700 | unsigned long zone_pfn; | 700 | unsigned long zone_pfn; |
@@ -770,7 +770,7 @@ static struct pbe * swsusp_pagedir_relocate(struct pbe *pblist) | |||
770 | 770 | ||
771 | static atomic_t io_done = ATOMIC_INIT(0); | 771 | static atomic_t io_done = ATOMIC_INIT(0); |
772 | 772 | ||
773 | static int end_io(struct bio * bio, unsigned int num, int err) | 773 | static int end_io(struct bio *bio, unsigned int num, int err) |
774 | { | 774 | { |
775 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) | 775 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) |
776 | panic("I/O error reading memory image"); | 776 | panic("I/O error reading memory image"); |
@@ -778,7 +778,7 @@ static int end_io(struct bio * bio, unsigned int num, int err) | |||
778 | return 0; | 778 | return 0; |
779 | } | 779 | } |
780 | 780 | ||
781 | static struct block_device * resume_bdev; | 781 | static struct block_device *resume_bdev; |
782 | 782 | ||
783 | /** | 783 | /** |
784 | * submit - submit BIO request. | 784 | * submit - submit BIO request. |
@@ -791,10 +791,10 @@ static struct block_device * resume_bdev; | |||
791 | * Then submit it and wait. | 791 | * Then submit it and wait. |
792 | */ | 792 | */ |
793 | 793 | ||
794 | static int submit(int rw, pgoff_t page_off, void * page) | 794 | static int submit(int rw, pgoff_t page_off, void *page) |
795 | { | 795 | { |
796 | int error = 0; | 796 | int error = 0; |
797 | struct bio * bio; | 797 | struct bio *bio; |
798 | 798 | ||
799 | bio = bio_alloc(GFP_ATOMIC, 1); | 799 | bio = bio_alloc(GFP_ATOMIC, 1); |
800 | if (!bio) | 800 | if (!bio) |
@@ -823,12 +823,12 @@ static int submit(int rw, pgoff_t page_off, void * page) | |||
823 | return error; | 823 | return error; |
824 | } | 824 | } |
825 | 825 | ||
826 | static int bio_read_page(pgoff_t page_off, void * page) | 826 | static int bio_read_page(pgoff_t page_off, void *page) |
827 | { | 827 | { |
828 | return submit(READ, page_off, page); | 828 | return submit(READ, page_off, page); |
829 | } | 829 | } |
830 | 830 | ||
831 | static int bio_write_page(pgoff_t page_off, void * page) | 831 | static int bio_write_page(pgoff_t page_off, void *page) |
832 | { | 832 | { |
833 | return submit(WRITE, page_off, page); | 833 | return submit(WRITE, page_off, page); |
834 | } | 834 | } |
@@ -838,7 +838,7 @@ static int bio_write_page(pgoff_t page_off, void * page) | |||
838 | * I really don't think that it's foolproof but more than nothing.. | 838 | * I really don't think that it's foolproof but more than nothing.. |
839 | */ | 839 | */ |
840 | 840 | ||
841 | static const char * sanity_check(void) | 841 | static const char *sanity_check(void) |
842 | { | 842 | { |
843 | dump_info(); | 843 | dump_info(); |
844 | if (swsusp_info.version_code != LINUX_VERSION_CODE) | 844 | if (swsusp_info.version_code != LINUX_VERSION_CODE) |
@@ -864,7 +864,7 @@ static const char * sanity_check(void) | |||
864 | 864 | ||
865 | static int check_header(void) | 865 | static int check_header(void) |
866 | { | 866 | { |
867 | const char * reason = NULL; | 867 | const char *reason = NULL; |
868 | int error; | 868 | int error; |
869 | 869 | ||
870 | if ((error = bio_read_page(swp_offset(swsusp_header.swsusp_info), &swsusp_info))) | 870 | if ((error = bio_read_page(swp_offset(swsusp_header.swsusp_info), &swsusp_info))) |
@@ -912,7 +912,7 @@ static int check_sig(void) | |||
912 | 912 | ||
913 | static int data_read(struct pbe *pblist) | 913 | static int data_read(struct pbe *pblist) |
914 | { | 914 | { |
915 | struct pbe * p; | 915 | struct pbe *p; |
916 | int error = 0; | 916 | int error = 0; |
917 | int i = 0; | 917 | int i = 0; |
918 | int mod = swsusp_info.image_pages / 100; | 918 | int mod = swsusp_info.image_pages / 100; |
@@ -950,7 +950,7 @@ static int data_read(struct pbe *pblist) | |||
950 | static int read_pagedir(struct pbe *pblist) | 950 | static int read_pagedir(struct pbe *pblist) |
951 | { | 951 | { |
952 | struct pbe *pbpage, *p; | 952 | struct pbe *pbpage, *p; |
953 | unsigned i = 0; | 953 | unsigned int i = 0; |
954 | int error; | 954 | int error; |
955 | 955 | ||
956 | if (!pblist) | 956 | if (!pblist) |