From: Paolo Bonzini <pbonzini@redhat.com>
To: linmiaohe <linmiaohe@huawei.com>, rkrcmar@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: get rid of var page in kvm_set_pfn_dirty()
Date: Thu, 5 Dec 2019 11:18:07 +0100 [thread overview]
Message-ID: <dbb89c0e-73f1-84a7-7f47-05ee886ba8f1@redhat.com> (raw)
In-Reply-To: <1575515105-19426-1-git-send-email-linmiaohe@huawei.com>
On 05/12/19 04:05, 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().
> 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);
>
>
Queued, thanks.
Paolo
next prev parent reply other threads:[~2019-12-05 10:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 3:05 linmiaohe
2019-12-05 10:18 ` Paolo Bonzini [this message]
2019-12-06 21:38 ` Sean Christopherson
2019-12-07 7:21 linmiaohe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbb89c0e-73f1-84a7-7f47-05ee886ba8f1@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®