From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753616AbbIRLTi (ORCPT ); Fri, 18 Sep 2015 07:19:38 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:52869 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753582AbbIRLTg (ORCPT ); Fri, 18 Sep 2015 07:19:36 -0400 X-Helo: d06dlp01.portsmouth.uk.ibm.com X-MailFrom: heiko.carstens@de.ibm.com X-RcptTo: linux-s390@vger.kernel.org Date: Fri, 18 Sep 2015 13:19:28 +0200 From: Heiko Carstens To: Alexander Kuleshov Cc: Martin Schwidefsky , Michael Holzheu , Tony Luck , David Hildenbrand , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] s390/crash_dump: Use PFN_PHYS and PFN_DOWN macros Message-ID: <20150918111928.GB3986@osiris> References: <1442343278-10641-1-git-send-email-kuleshovmail@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442343278-10641-1-git-send-email-kuleshovmail@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15091811-0013-0000-0000-0000056CE3E4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2015 at 12:54:38AM +0600, Alexander Kuleshov wrote: > The provides PFN_PHYS and PFN_DOWN macros for the > getting page frame number and physical address of a page frame number. > This patch replaces (pfn << PAGE_SHIFT) and (addr >> PAGE_SHIFT) > expressions with the PFN_PHYS and PFN_DOWN macros. > > Signed-off-by: Alexander Kuleshov > --- > arch/s390/kernel/crash_dump.c | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c > index 1e4fcfa..f8da32c 100644 > --- a/arch/s390/kernel/crash_dump.c > +++ b/arch/s390/kernel/crash_dump.c > @@ -136,7 +136,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, > > if (!csize) > return 0; > - src = (pfn << PAGE_SHIFT) + offset; > + src = (PFN_PHYS(pfn)) + offset; > if (OLDMEM_BASE) > return copy_oldmem_page_kdump(buf, csize, src, userbuf); > else > @@ -156,16 +156,17 @@ static int remap_oldmem_pfn_range_kdump(struct vm_area_struct *vma, > unsigned long size_old; > int rc; > > - if (pfn < OLDMEM_SIZE >> PAGE_SHIFT) { > - size_old = min(size, OLDMEM_SIZE - (pfn << PAGE_SHIFT)); > + if (pfn < PFN_DOWN(OLDMEM_SIZE)) { > + size_old = min(size, > + OLDMEM_SIZE - (unsigned long)(PFN_PHYS(pfn))); Cleanup patches like this are supposed to increase readability. That's certainly not the case here. Therefore I'm not applying this one. Thanks, Heiko