From: Gustavo Pimentel Date: Wed, 21 Oct 2020 21:12:20 +0000 (+0200) Subject: ARC: bitops: Remove unecessary operation and value X-Git-Tag: v5.10-rc6~35^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78aec9bb1f3c79e4570eb50260d6320063f823a2;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Vineet Gupta --- diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h index c6606f4d20d6e..fb98440c0bd4c 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; }