powerpc: Simplify test in __dma_sync()
[deliverable/linux.git] / arch / powerpc / mm / dma-noncoherent.c
index 169aba446a7403d390717bfc57d621b16a455bfa..2dc74e5c64584e237a854be90f317d3f2d52c1da 100644 (file)
@@ -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);
This page took 0.023887 seconds and 5 git commands to generate.