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>
{
struct zone *zone;
unsigned long zone_pfn;
{
struct zone *zone;
unsigned long zone_pfn;
for_each_zone (zone) {
if (is_highmem(zone))
continue;
for_each_zone (zone) {
if (is_highmem(zone))
continue;
* of memory pages allocated with alloc_pagedir()
*/
* of memory pages allocated with alloc_pagedir()
*/
-void create_pbe_list(struct pbe *pblist, unsigned nr_pages)
+void create_pbe_list(struct pbe *pblist, unsigned int nr_pages)
{
struct pbe *pbpage, *p;
{
struct pbe *pbpage, *p;
- unsigned num = PBES_PER_PAGE;
+ unsigned int num = PBES_PER_PAGE;
for_each_pb_page (pbpage, pblist) {
if (num >= nr_pages)
for_each_pb_page (pbpage, pblist) {
if (num >= nr_pages)
* On each page we set up a list of struct_pbe elements.
*/
* On each page we set up a list of struct_pbe elements.
*/
-struct pbe *alloc_pagedir(unsigned nr_pages)
+struct pbe *alloc_pagedir(unsigned int nr_pages)
struct pbe *pblist, *pbe;
if (!nr_pages)
struct pbe *pblist, *pbe;
if (!nr_pages)
for_each_zone(zone) {
for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
if (pfn_valid(zone_pfn + zone->zone_start_pfn)) {
for_each_zone(zone) {
for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
if (pfn_valid(zone_pfn + zone->zone_start_pfn)) {
page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
if (PageNosave(page) && PageNosaveFree(page)) {
ClearPageNosave(page);
page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
if (PageNosave(page) && PageNosaveFree(page)) {
ClearPageNosave(page);
-static int enough_free_mem(unsigned nr_pages)
+static int enough_free_mem(unsigned int nr_pages)
{
pr_debug("swsusp: available memory: %u pages\n", nr_free_pages());
return nr_free_pages() > (nr_pages + PAGES_FOR_IO +
{
pr_debug("swsusp: available memory: %u pages\n", nr_free_pages());
return nr_free_pages() > (nr_pages + PAGES_FOR_IO +
-static struct pbe *swsusp_alloc(unsigned nr_pages)
+static struct pbe *swsusp_alloc(unsigned int nr_pages)
{
struct pbe *pblist, *p;
{
struct pbe *pblist, *p;
asmlinkage int swsusp_save(void)
{
asmlinkage int swsusp_save(void)
{
pr_debug("swsusp: critical section: \n");
if (save_highmem()) {
pr_debug("swsusp: critical section: \n");
if (save_highmem()) {
static unsigned short swapfile_used[MAX_SWAPFILES];
static unsigned short root_swap;
static unsigned short swapfile_used[MAX_SWAPFILES];
static unsigned short root_swap;
-static int write_page(unsigned long addr, swp_entry_t * loc);
-static int bio_read_page(pgoff_t page_off, void * page);
+static int write_page(unsigned long addr, swp_entry_t *loc);
+static int bio_read_page(pgoff_t page_off, void *page);
static u8 key_iv[MAXKEY+MAXIV];
static u8 key_iv[MAXKEY+MAXIV];
* This is a partial improvement, since we will at least return other
* errors, though we need to eventually fix the damn code.
*/
* This is a partial improvement, since we will at least return other
* errors, though we need to eventually fix the damn code.
*/
-static int write_page(unsigned long addr, swp_entry_t * loc)
+static int write_page(unsigned long addr, swp_entry_t *loc)
{
swp_entry_t entry;
int error = 0;
{
swp_entry_t entry;
int error = 0;
static void data_free(void)
{
swp_entry_t entry;
static void data_free(void)
{
swp_entry_t entry;
for_each_pbe(p, pagedir_nosave) {
entry = p->swap_address;
for_each_pbe(p, pagedir_nosave) {
entry = p->swap_address;
static int write_pagedir(void)
{
int error = 0;
static int write_pagedir(void)
{
int error = 0;
- unsigned n = 0;
- struct pbe * pbe;
+ unsigned int n = 0;
+ struct pbe *pbe;
printk( "Writing pagedir...");
for_each_pb_page (pbe, pagedir_nosave) {
printk( "Writing pagedir...");
for_each_pb_page (pbe, pagedir_nosave) {
* We should only consider resume_device.
*/
* We should only consider resume_device.
*/
-int enough_swap(unsigned nr_pages)
+int enough_swap(unsigned int nr_pages)
* restore from the loaded pages later. We relocate them here.
*/
* restore from the loaded pages later. We relocate them here.
*/
-static struct pbe * swsusp_pagedir_relocate(struct pbe *pblist)
+static struct pbe *swsusp_pagedir_relocate(struct pbe *pblist)
{
struct zone *zone;
unsigned long zone_pfn;
{
struct zone *zone;
unsigned long zone_pfn;
static atomic_t io_done = ATOMIC_INIT(0);
static atomic_t io_done = ATOMIC_INIT(0);
-static int end_io(struct bio * bio, unsigned int num, int err)
+static int end_io(struct bio *bio, unsigned int num, int err)
{
if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
panic("I/O error reading memory image");
{
if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
panic("I/O error reading memory image");
-static struct block_device * resume_bdev;
+static struct block_device *resume_bdev;
/**
* submit - submit BIO request.
/**
* submit - submit BIO request.
* Then submit it and wait.
*/
* Then submit it and wait.
*/
-static int submit(int rw, pgoff_t page_off, void * page)
+static int submit(int rw, pgoff_t page_off, void *page)
bio = bio_alloc(GFP_ATOMIC, 1);
if (!bio)
bio = bio_alloc(GFP_ATOMIC, 1);
if (!bio)
-static int bio_read_page(pgoff_t page_off, void * page)
+static int bio_read_page(pgoff_t page_off, void *page)
{
return submit(READ, page_off, page);
}
{
return submit(READ, page_off, page);
}
-static int bio_write_page(pgoff_t page_off, void * page)
+static int bio_write_page(pgoff_t page_off, void *page)
{
return submit(WRITE, page_off, page);
}
{
return submit(WRITE, page_off, page);
}
* I really don't think that it's foolproof but more than nothing..
*/
* I really don't think that it's foolproof but more than nothing..
*/
-static const char * sanity_check(void)
+static const char *sanity_check(void)
{
dump_info();
if (swsusp_info.version_code != LINUX_VERSION_CODE)
{
dump_info();
if (swsusp_info.version_code != LINUX_VERSION_CODE)
static int check_header(void)
{
static int check_header(void)
{
- const char * reason = NULL;
+ const char *reason = NULL;
int error;
if ((error = bio_read_page(swp_offset(swsusp_header.swsusp_info), &swsusp_info)))
int error;
if ((error = bio_read_page(swp_offset(swsusp_header.swsusp_info), &swsusp_info)))
static int data_read(struct pbe *pblist)
{
static int data_read(struct pbe *pblist)
{
int error = 0;
int i = 0;
int mod = swsusp_info.image_pages / 100;
int error = 0;
int i = 0;
int mod = swsusp_info.image_pages / 100;
static int read_pagedir(struct pbe *pblist)
{
struct pbe *pbpage, *p;
static int read_pagedir(struct pbe *pblist)
{
struct pbe *pbpage, *p;