]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] swsusp: simpler calculation of number of pages in PBE list
authorMichal Schmidt <xschmi00@stud.feec.vutbr.cz>
Sat, 3 Sep 2005 22:57:02 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@evo.osdl.org>
Mon, 5 Sep 2005 07:06:17 +0000 (00:06 -0700)
commit4c4ae10abd76c4517286500e9b455c45103aea3d
tree68f323a6e919d96dad59471decb3bea3ec6a36fc
parentef528823447ce1960a5a8d052d5eb76d7ff1d473
[PATCH] swsusp: simpler calculation of number of pages in PBE list

The function calc_nr uses an iterative algorithm to calculate the number of
pages needed for the image and the pagedir.  Exactly the same result can be
obtained with a one-line expression.

Note that this was even proved correct ;-).

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/power/swsusp.c