]> 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)
commitab42a86b07f30855ce5fac7220f08b92324a42ff
tree7867ed0a23d1df9f8a5567369b17a9469590344b
parent24239ccc6f3ea4bb4f163eb464ee885c24afb867
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