From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx153.postini.com [74.125.245.153]) by kanga.kvack.org (Postfix) with SMTP id 20A3B6B0031 for ; Mon, 5 Aug 2013 04:52:47 -0400 (EDT) Date: Mon, 5 Aug 2013 16:54:04 +0800 From: Greg Kroah-Hartman Subject: Re: [PATCH 1/2] cma: use macro PFN_DOWN when converting size to pages Message-ID: <20130805085404.GA22170@kroah.com> References: <51FF62C4.9010001@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51FF62C4.9010001@huawei.com> Sender: owner-linux-mm@kvack.org List-ID: To: Xishi Qiu Cc: Andrew Morton , linux-mm@kvack.org, LKML On Mon, Aug 05, 2013 at 04:31:00PM +0800, Xishi Qiu wrote: > Use "PFN_DOWN(r->size)" instead of "r->size >> PAGE_SHIFT". > > Signed-off-by: Xishi Qiu > --- > drivers/base/dma-contiguous.c | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 0ca5442..1bcfaed 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -201,13 +201,12 @@ static int __init cma_init_reserved_areas(void) > { > struct cma_reserved *r = cma_reserved; > unsigned i = cma_reserved_count; > + struct cma *cma; Why change this? > > pr_debug("%s()\n", __func__); > > for (; i; --i, ++r) { > - struct cma *cma; > - cma = cma_create_area(PFN_DOWN(r->start), > - r->size >> PAGE_SHIFT); > + cma = cma_create_area(PFN_DOWN(r->start), PFN_DOWN(r->size)); That's reasonable to clean up, but nothing major. Care to resend this without the cma change? thanks, greg k-h -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org