Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()

Claudio Imbrenda <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-s390
Organization IBM
Message-ID <20260807132844.4cc87356@p-imbrenda>
On Fri, 07 Aug 2026 13:06:41 +0200
Sven Schnelle <[email protected]> wrote:

> Sven Schnelle <[email protected]> writes:
> 
> > Christoph Schlameuss <[email protected]> writes:
> >  
> >> Make the code slightly more readable.
> >>
> >> Signed-off-by: Christoph Schlameuss <[email protected]>
> >> ---
> >>  arch/s390/kvm/vsie.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> >> index 3e956c7faa4b..937f9c99bc00 100644
> >> --- a/arch/s390/kvm/vsie.c
> >> +++ b/arch/s390/kvm/vsie.c
> >> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
> >>  /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
> >>  static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
> >>  {
> >> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
> >> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
> >>  	/* mark the page always as dirty for migration */
> >>  	mark_page_dirty(kvm, gpa_to_gfn(gpa));
> >>  }  
> >
> > Could you add to the commit description what you changed? I.e. use
> > phys_to_pfn() instead of the open coded shift? It's bad if you do a 'git
> > log' and get commit with useless descriptions like 'make code more
> > readable'.  
> 
> Nevermind - was in a rush and missed that it's in the summary... :-/

I still think the description should be self-contained and not be split
between the subject line and the body, even if it means that the body
of the text repeats the subject line again.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.