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> Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
This commit is contained in:
parent
11fe13278e
commit
041d31dd28
|
@ -71,7 +71,7 @@ static inline void linkmode_change_bit(int nr, volatile unsigned long *addr)
|
||||||
__change_bit(nr, 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);
|
return test_bit(nr, addr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue