All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: get rid of var page in kvm_set_pfn_dirty()
@ 2019-12-05  3:05 linmiaohe
  2019-12-05 10:18 ` Paolo Bonzini
  2019-12-06 21:38 ` Sean Christopherson
  0 siblings, 2 replies; 4+ messages in thread
From: linmiaohe @ 2019-12-05  3:05 UTC (permalink / raw)
  To: pbonzini, rkrcmar; +Cc: linmiaohe, kvm, linux-kernel

From: Miaohe Lin <linmiaohe@huawei.com>

We can get rid of unnecessary var page in
kvm_set_pfn_dirty() , thus make code style
similar with kvm_set_pfn_accessed().
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 virt/kvm/kvm_main.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 00268290dcbd..3aa21bec028d 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1931,11 +1931,8 @@ EXPORT_SYMBOL_GPL(kvm_release_pfn_dirty);
 
 void kvm_set_pfn_dirty(kvm_pfn_t pfn)
 {
-	if (!kvm_is_reserved_pfn(pfn) && !kvm_is_zone_device_pfn(pfn)) {
-		struct page *page = pfn_to_page(pfn);
-
-		SetPageDirty(page);
-	}
+	if (!kvm_is_reserved_pfn(pfn) && !kvm_is_zone_device_pfn(pfn))
+		SetPageDirty(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: get rid of var page in kvm_set_pfn_dirty()
@ 2019-12-07  7:21 linmiaohe
  0 siblings, 0 replies; 4+ messages in thread
From: linmiaohe @ 2019-12-07  7:21 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: pbonzini, rkrcmar, kvm, linux-kernel

Sean Christopherson wrote:
>On Thu, Dec 05, 2019 at 11:05:05AM +0800, linmiaohe wrote:
>> From: Miaohe Lin <linmiaohe@huawei.com>
>> 
>> We can get rid of unnecessary var page in
>> kvm_set_pfn_dirty() , thus make code style similar with 
>> kvm_set_pfn_accessed().
>
>For future reference, there's no need to wrap so aggressively, preferred kernel style is to wrap at 75 columns (though for some reason I am in the habit of wrapping changelogs at 73 columns), e.g.:
>
>We can get rid of unnecessary var page in kvm_set_pfn_dirty(), thus make code style similar with kvm_set_pfn_accessed().
>
Many thanks for your remind. I would try to wrap changelogs at about 75 columns.
Thanks again.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-07  7:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05  3:05 [PATCH] KVM: get rid of var page in kvm_set_pfn_dirty() linmiaohe
2019-12-05 10:18 ` Paolo Bonzini
2019-12-06 21:38 ` Sean Christopherson
2019-12-07  7:21 linmiaohe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.