Linus Torvalds writes: (Summary) And it so happens that clang will see that it's constant
because it's a macro (well, unless that macro is then used in an
inline function).
inline function).
The set_bit() pattern looks completely different, and doesn't have that abstraction of "constant_set_bit()" vs "variable_set_bit()", like test_bit() does.
test_bit() does.
THAT was why I pointed it out - we do different things otherwise similar operations.
similar operations.
Not because it would be odd that we do different things for the "constant bit number" vs "variable bit number".
inline function).
The set_bit() pattern looks completely different, and doesn't have that abstraction of "constant_set_bit()" vs "variable_set_bit()", like test_bit() does.
test_bit() does.
THAT was why I pointed it out - we do different things otherwise similar operations.
similar operations.
Not because it would be odd that we do different things for the "constant bit number" vs "variable bit number".