History

net: linkmode: make linkmode_test_bit() take const pointer

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.

Russell King committed 6 years ago

Commit 8062e231 parent ce780551 file · +1 −1Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/linkmode.h+1−1
@@ -71,7 +71,7 @@ static inline void linkmode_change_bit(int nr, volatile unsigned long *addr) · 70 unmodified lines
71 __change_bit(nr, addr);71 __change_bit(nr, addr);
72}72}
73 73
74static inline int linkmode_test_bit(int nr, volatile unsigned long *addr)74static inline int linkmode_test_bit(int nr, const volatile unsigned long *addr)
75{75{
76 return test_bit(nr, addr);76 return test_bit(nr, addr);
77}77}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t