]> Git Repo - linux.git/commitdiff
Hibernate: Replace unnecessary evaluation of pfn_to_page()
authorRafael J. Wysocki <[email protected]>
Sun, 7 Dec 2008 23:52:49 +0000 (00:52 +0100)
committerLen Brown <[email protected]>
Fri, 19 Dec 2008 09:40:35 +0000 (04:40 -0500)
Replace one evaluation of pfn_to_page() in copy_data_pages() with
the value of a local variable containing the right number already.

Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Len Brown <[email protected]>
kernel/power/snapshot.c

index ec9f153b2fc23f8f1f515f98d3d0eb31e6b0417a..f5fc2d7680f26dbbb84aa1af4b9afa68ba7edf8b 100644 (file)
@@ -981,7 +981,7 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
                         * data modified by kmap_atomic()
                         */
                        safe_copy_page(buffer, s_page);
-                       dst = kmap_atomic(pfn_to_page(dst_pfn), KM_USER0);
+                       dst = kmap_atomic(d_page, KM_USER0);
                        memcpy(dst, buffer, PAGE_SIZE);
                        kunmap_atomic(dst, KM_USER0);
                } else {
This page took 0.061624 seconds and 4 git commands to generate.