summaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorGustavo Pimentel <gustavo.pimentel@synopsys.com>2020-10-21 23:12:20 +0200
committerVineet Gupta <vgupta@synopsys.com>2020-11-17 20:10:21 -0800
commit78aec9bb1f3c79e4570eb50260d6320063f823a2 (patch)
tree66f93ecfbe10ed8f2778bc0c3ee07dd2a557384e /arch/arc
parent3b57533b460c8dc22a432684b7e8d22571f34d2e (diff)
ARC: bitops: Remove unecessary operation and value
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>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/bitops.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index c6606f4d20d6..fb98440c0bd4 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -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;
}