diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-02-16 02:57:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-17 06:39:44 +0300 |
commit | 8062e2333f8f7dcd5627e22b99e18d1cbb53eedb (patch) | |
tree | 73e615519fb79cad4913a5846829ec1848b91f80 /include/linux | |
parent | ce7805513d902c07d8d4266b73b692fbdc66f440 (diff) | |
download | linux-8062e2333f8f7dcd5627e22b99e18d1cbb53eedb.tar.xz |
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.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/linkmode.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h index fe740031339d..8e5b352e44f2 100644 --- a/include/linux/linkmode.h +++ b/include/linux/linkmode.h @@ -71,7 +71,7 @@ static inline void linkmode_change_bit(int nr, volatile unsigned long *addr) __change_bit(nr, addr); } -static inline int linkmode_test_bit(int nr, volatile unsigned long *addr) +static inline int linkmode_test_bit(int nr, const volatile unsigned long *addr) { return test_bit(nr, addr); } |