lkml.org 
[lkml]   [2005]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] swsusp: two simplifications
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 <rjw@sisk.pl>
>
> --- 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 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/

\
 
 \ /
  Last update: 2005-10-18 01:56    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site