[PATCH 3/3] s390/bitops: Remove volatile qualifier from flogr() inline assembly

Heiko Carstens posted 3 patches 8 hours ago
[PATCH 3/3] s390/bitops: Remove volatile qualifier from flogr() inline assembly
Posted by Heiko Carstens 8 hours ago
The flogr() inline assembly has no side effects and generates the same
output if the input does not change. Therefore remove the volatile
qualifier to allow the compiler to optimize the inline assembly away,
if possible.

This also removes the superfluous '\n' which makes the inline assembly
appear larger than it is according to compiler heuristics (number of
lines).

Suggested-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 arch/s390/include/asm/bitops.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h
index 46b90b545986..5e04836c9c8d 100644
--- a/arch/s390/include/asm/bitops.h
+++ b/arch/s390/include/asm/bitops.h
@@ -167,9 +167,8 @@ static __always_inline __attribute_const__ unsigned long __flogr(unsigned long w
 		union register_pair rp __uninitialized;
 
 		rp.even = word;
-		asm volatile(
-			"       flogr   %[rp],%[rp]\n"
-			: [rp] "+d" (rp.pair) : : "cc");
+		asm("flogr	%[rp],%[rp]"
+		    : [rp] "+d" (rp.pair) : : "cc");
 		bit = rp.even;
 		__assume(bit <= 64);
 		return bit & 127;
-- 
2.48.1