summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2016-02-09 17:08:29 +0100
committerScott Wood <oss@buserror.net>2016-03-11 17:20:12 -0600
commit8478d7f091138be32154c8fc28c52978e342cc6f (patch)
tree3a13c180405c78ad6052bd5c3fe3ffff2da87c76 /arch/powerpc
parentaffe587bacf48e328fb8d4c5ef9007b9c555b128 (diff)
downloadlinux-8478d7f091138be32154c8fc28c52978e342cc6f.tar.bz2
powerpc: Simplify test in __dma_sync()
This simplification helps the compiler. We now have only one test instead of two, so it reduces the number of branches. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/dma-noncoherent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c
index 169aba446a74..2dc74e5c6458 100644
--- a/arch/powerpc/mm/dma-noncoherent.c
+++ b/arch/powerpc/mm/dma-noncoherent.c
@@ -327,7 +327,7 @@ void __dma_sync(void *vaddr, size_t size, int direction)
* invalidate only when cache-line aligned otherwise there is
* the potential for discarding uncommitted data from the cache
*/
- if ((start & (L1_CACHE_BYTES - 1)) || (size & (L1_CACHE_BYTES - 1)))
+ if ((start | end) & (L1_CACHE_BYTES - 1))
flush_dcache_range(start, end);
else
invalidate_dcache_range(start, end);