ARC: bitops: Remove unecessary operation and value
authorGustavo Pimentel <gustavo.pimentel@synopsys.com>
Wed, 21 Oct 2020 21:12:20 +0000 (23:12 +0200)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 18 Nov 2020 04:10:21 +0000 (20:10 -0800)
The 1-bit shift rotation to the left on x variable located on
4   last if statement can be removed because the computed value is will
not be used afront.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/bitops.h

index c6606f4..fb98440 100644 (file)
@@ -243,10 +243,8 @@ static inline int constant_fls(unsigned int x)
                x <<= 2;
                r -= 2;
        }
-       if (!(x & 0x80000000u)) {
-               x <<= 1;
+       if (!(x & 0x80000000u))
                r -= 1;
-       }
        return r;
 }