[PATCH V2] cma: use macro PFN_DOWN when converting size to pages

From: Xishi Qiu
Date: Mon Aug 05 2013 - 05:09:29 EST


Use "PFN_DOWN(r->size)" instead of "r->size >> PAGE_SHIFT".

Signed-off-by: Xishi Qiu <qiuxishi@xxxxxxxxxx>
---
drivers/base/dma-contiguous.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index 0ca5442..b3d711d 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -206,8 +206,7 @@ static int __init cma_init_reserved_areas(void)

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));
if (!IS_ERR(cma))
dev_set_cma_area(r->dev, cma);
}
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/