projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
692a68e
)
riscv: Remove unnecessary int cast in variable_fls()
author
Thorsten Blum
<thorsten.blum@toblux.com>
Wed, 10 Jul 2024 20:24:18 +0000
(22:24 +0200)
committer
Yury 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
patch
|
blob
|
history
diff --git
a/arch/riscv/include/asm/bitops.h
b/arch/riscv/include/asm/bitops.h
index 880606b0469a83bc97d864da9235ce29b5807970..71af9ecfcfcb2b96c56611179b0a86c3ccfc2c0a 100644
(file)
--- a/
arch/riscv/include/asm/bitops.h
+++ b/
arch/riscv/include/asm/bitops.h
@@
-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_); \
})