Re: [PATCH 3/4] swsusp: two simplifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> The following patch simplifies the progress meter in disk.c:free_some_memory()
> and makes disk.c:pm_suspend_disk() call device_resume() explicitly in the
> suspend path.

ACK.

> Signed-off-by: Rafael J. Wysocki <[email protected]>
> 
> --- linux-2.6.14-rc4-mm1.orig/kernel/power/disk.c	2005-10-17 23:28:33.000000000 +0200
> +++ linux-2.6.14-rc4-mm1/kernel/power/disk.c	2005-10-17 23:28:52.000000000 +0200
> @@ -92,10 +92,7 @@
>  	printk("Freeing memory...  ");
>  	while ((tmp = shrink_all_memory(10000))) {
>  		pages += tmp;
> -		printk("\b%c", p[i]);
> -		i++;
> -		if (i > 3)
> -			i = 0;
> +		printk("\b%c", p[i++ % 4]);
>  	}
>  	printk("\bdone (%li pages freed)\n", pages);
>  }

This is actually not equivalent, but ok. (Equivalent would be ++i % 4
;-)

							Pavel

-- 
Boycott Kodak -- for their patent abuse against Java.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux