* [PATCH -suspend] Hibernate: Replace unnecessary evaluation of pfn_to_page()
@ 2008-12-07 23:52 Rafael J. Wysocki
2008-12-08 7:26 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2008-12-07 23:52 UTC (permalink / raw)
To: Len Brown; +Cc: LKML, Pavel Machek, pm list
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: Hibernate: Replace unnecessary evaluation of pfn_to_page()
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 <rjw@sisk.pl>
---
kernel/power/snapshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/power/snapshot.c
===================================================================
--- linux-2.6.orig/kernel/power/snapshot.c
+++ linux-2.6/kernel/power/snapshot.c
@@ -981,7 +981,7 @@ static void copy_data_page(unsigned long
* 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 {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -suspend] Hibernate: Replace unnecessary evaluation of pfn_to_page()
2008-12-07 23:52 [PATCH -suspend] Hibernate: Replace unnecessary evaluation of pfn_to_page() Rafael J. Wysocki
@ 2008-12-08 7:26 ` Pavel Machek
2008-12-11 23:28 ` Len Brown
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2008-12-08 7:26 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Len Brown, LKML, pm list
On Mon 2008-12-08 00:52:49, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: Hibernate: Replace unnecessary evaluation of pfn_to_page()
>
> 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 <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
> ---
> kernel/power/snapshot.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6/kernel/power/snapshot.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/snapshot.c
> +++ linux-2.6/kernel/power/snapshot.c
> @@ -981,7 +981,7 @@ static void copy_data_page(unsigned long
> * 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 {
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -suspend] Hibernate: Replace unnecessary evaluation of pfn_to_page()
2008-12-08 7:26 ` Pavel Machek
@ 2008-12-11 23:28 ` Len Brown
0 siblings, 0 replies; 3+ messages in thread
From: Len Brown @ 2008-12-11 23:28 UTC (permalink / raw)
To: Pavel Machek; +Cc: Rafael J. Wysocki, LKML, pm list
On Mon, 8 Dec 2008, Pavel Machek wrote:
> On Mon 2008-12-08 00:52:49, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > Subject: Hibernate: Replace unnecessary evaluation of pfn_to_page()
> >
> > 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 <rjw@sisk.pl>
>
> Acked-by: Pavel Machek <pavel@suse.cz>
applied to suspend branch
--
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-12 0:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-07 23:52 [PATCH -suspend] Hibernate: Replace unnecessary evaluation of pfn_to_page() Rafael J. Wysocki
2008-12-08 7:26 ` Pavel Machek
2008-12-11 23:28 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®