Commit fb9086e9 authored by Thorsten Blum's avatar Thorsten Blum Committed by Yury Norov

riscv: Remove unnecessary int cast in variable_fls()

__builtin_clz() returns an int and casting the whole expression to int
is unnecessary. Remove it.
Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
parent 692a68ee
...@@ -170,7 +170,7 @@ static __always_inline int variable_fls(unsigned int x) ...@@ -170,7 +170,7 @@ static __always_inline int variable_fls(unsigned int x)
({ \ ({ \
typeof(x) x_ = (x); \ typeof(x) x_ = (x); \
__builtin_constant_p(x_) ? \ __builtin_constant_p(x_) ? \
(int)((x_ != 0) ? (32 - __builtin_clz(x_)) : 0) \ ((x_ != 0) ? (32 - __builtin_clz(x_)) : 0) \
: \ : \
variable_fls(x_); \ variable_fls(x_); \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment