linkmode_test_bit() does not modify the address; test_bit() is also declared const volatile for the same reason. There's no need for linkmode_test_bit() to be any different, and allows implementation of helpers that take a const linkmode pointer.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -71,7 +71,7 @@ static inline void linkmode_change_bit(int nr, volatile unsigned long *addr) · 70 unmodified lines | ||
| 71 | 71 | __change_bit(nr, addr); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | −static inline int linkmode_test_bit(int nr, volatile unsigned long *addr) | |
| 74 | +static inline int linkmode_test_bit(int nr, const volatile unsigned long *addr) | |
| 75 | 75 | { |
| 76 | 76 | return test_bit(nr, addr); |
| 77 | 77 | } |