diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2016-02-09 17:08:29 +0100 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-03-12 00:20:12 +0100 |
commit | 8478d7f091138be32154c8fc28c52978e342cc6f (patch) | |
tree | 3a13c180405c78ad6052bd5c3fe3ffff2da87c76 /arch/powerpc/mm/dma-noncoherent.c | |
parent | powerpc32: move xxxxx_dcache_range() functions inline (diff) | |
download | linux-8478d7f091138be32154c8fc28c52978e342cc6f.tar.xz linux-8478d7f091138be32154c8fc28c52978e342cc6f.zip |
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/mm/dma-noncoherent.c')
-rw-r--r-- | arch/powerpc/mm/dma-noncoherent.c | 2 |
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); |