]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: bitops: Handle !kernel_uses_llsc first
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:25 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:37 +0000 (09:42 -0700)
commit57d38a4b408f4d86cc7dcec2a75cea3e05032809
tree7867ed0a23d1df9f8a5567369b17a9469590344b
parent110125c6128dcea1352be50df315ba232d09c869
MIPS: bitops: Handle !kernel_uses_llsc first

Reorder conditions in our various bitops functions that check
kernel_uses_llsc such that they handle the !kernel_uses_llsc case first.
This allows us to avoid the need to duplicate the kernel_uses_llsc check
in all the other cases. For functions that don't involve barriers common
to the various implementations, we switch to returning from within each
if block making each case easier to read in isolation.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-kernel@vger.kernel.org
arch/mips/include/asm/bitops.h