Use "PFN_DOWN(r->size)" instead of "r->size >> PAGE_SHIFT". Signed-off-by: Xishi Qiu <qiuxishi@xxxxxxxxxx> --- 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; 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)); if (!IS_ERR(cma)) dev_set_cma_area(r->dev, cma); } -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>