]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
riscv: Remove unnecessary int cast in variable_fls()
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 10 Jul 2024 20:24:18 +0000 (22:24 +0200)
committerYury Norov <yury.norov@gmail.com>
Wed, 10 Jul 2024 21:30:35 +0000 (14:30 -0700)
__builtin_clz() returns an int and casting the whole expression to int
is unnecessary. Remove it.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
arch/riscv/include/asm/bitops.h

index 880606b0469a83bc97d864da9235ce29b5807970..71af9ecfcfcb2b96c56611179b0a86c3ccfc2c0a 100644 (file)
@@ -170,7 +170,7 @@ legacy:
 ({                                                             \
        typeof(x) x_ = (x);                                     \
        __builtin_constant_p(x_) ?                              \
-        (int)((x_ != 0) ? (32 - __builtin_clz(x_)) : 0)        \
+        ((x_ != 0) ? (32 - __builtin_clz(x_)) : 0)             \
         :                                                      \
         variable_fls(x_);                                      \
 })