aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/linkmode.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-02-15 23:57:36 +0000
committerDavid S. Miller <davem@davemloft.net>2020-02-16 19:39:44 -0800
commit8062e2333f8f7dcd5627e22b99e18d1cbb53eedb (patch)
tree73e615519fb79cad4913a5846829ec1848b91f80 /include/linux/linkmode.h
parentMerge branch 'r8169-series-with-further-smaller-improvements' (diff)
downloadlinux-dev-8062e2333f8f7dcd5627e22b99e18d1cbb53eedb.tar.xz
linux-dev-8062e2333f8f7dcd5627e22b99e18d1cbb53eedb.zip
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/linkmode.h')
-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);
}