summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-01-03 19:41:39 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2020-02-17 16:30:01 +0000
commitaccc3c7e052d974e121f652bedba6919565aed1a (patch)
treec8e695c74b491f4995181fefd6a23769d3b6cc66
parent91b32d9c5985a173b41d2d3fb3fcaa0f2625c240 (diff)
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. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--include/linux/linkmode.h2
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);
}