diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2012-09-11 07:39:39 +0200 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-10-02 08:57:45 +0200 |
commit | 5a796eeb7bbacc628044b12a2d000167ddbabec8 (patch) | |
tree | 0badd7d455913cf35d6282592b7f6d406263e722 /arch/arm/mm | |
parent | bdd43cb39f1b1e897c5d7992d05d0b9f0dd786d1 (diff) | |
download | linux-5a796eeb7bbacc628044b12a2d000167ddbabec8.tar.gz linux-5a796eeb7bbacc628044b12a2d000167ddbabec8.tar.bz2 linux-5a796eeb7bbacc628044b12a2d000167ddbabec8.zip |
ARM: dma-mapping: Small logical clean up
Skip unnecessary operations if order == 0. A little bit easier to
read.
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 13f555d62491..c390cea6a258 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1012,11 +1012,12 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, gfp_t if (!pages[i]) goto error; - if (order) + if (order) { split_page(pages[i], order); - j = 1 << order; - while (--j) - pages[i + j] = pages[i] + j; + j = 1 << order; + while (--j) + pages[i + j] = pages[i] + j; + } __dma_clear_buffer(pages[i], PAGE_SIZE << order); i += 1 << order; |