diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2012-09-11 01:39:39 -0400 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-10-02 02:57:45 -0400 |
commit | 5a796eeb7bbacc628044b12a2d000167ddbabec8 (patch) | |
tree | 0badd7d455913cf35d6282592b7f6d406263e722 /arch | |
parent | bdd43cb39f1b1e897c5d7992d05d0b9f0dd786d1 (diff) |
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')
-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 13f555d6249..c390cea6a25 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 | |||
1012 | if (!pages[i]) | 1012 | if (!pages[i]) |
1013 | goto error; | 1013 | goto error; |
1014 | 1014 | ||
1015 | if (order) | 1015 | if (order) { |
1016 | split_page(pages[i], order); | 1016 | split_page(pages[i], order); |
1017 | j = 1 << order; | 1017 | j = 1 << order; |
1018 | while (--j) | 1018 | while (--j) |
1019 | pages[i + j] = pages[i] + j; | 1019 | pages[i + j] = pages[i] + j; |
1020 | } | ||
1020 | 1021 | ||
1021 | __dma_clear_buffer(pages[i], PAGE_SIZE << order); | 1022 | __dma_clear_buffer(pages[i], PAGE_SIZE << order); |
1022 | i += 1 << order; | 1023 | i += 1 << order; |