Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe Leroy and committed by
Scott Wood
8478d7f0 affe587b

+1 -1
+1 -1
arch/powerpc/mm/dma-noncoherent.c
··· 327 327 * invalidate only when cache-line aligned otherwise there is 328 328 * the potential for discarding uncommitted data from the cache 329 329 */ 330 - if ((start & (L1_CACHE_BYTES - 1)) || (size & (L1_CACHE_BYTES - 1))) 330 + if ((start | end) & (L1_CACHE_BYTES - 1)) 331 331 flush_dcache_range(start, end); 332 332 else 333 333 invalidate_dcache_range(start, end);