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

From: Pavel Machek
Date: Mon Oct 17 2005 - 18:54:21 EST


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@xxxxxxx>
>
> --- 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/