Skip to content

Commit fb9086e

Browse files
tobluxYuryNorov
authored andcommitted
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: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Yury Norov <yury.norov@gmail.com>
1 parent 692a68e commit fb9086e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/riscv/include/asm/bitops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static __always_inline int variable_fls(unsigned int x)
170170
({ \
171171
typeof(x) x_ = (x); \
172172
__builtin_constant_p(x_) ? \
173-
(int)((x_ != 0) ? (32 - __builtin_clz(x_)) : 0) \
173+
((x_ != 0) ? (32 - __builtin_clz(x_)) : 0) \
174174
: \
175175
variable_fls(x_); \
176176
})

0 commit comments

Comments
 (0)