Blob Blame History Raw
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Sat, 15 Feb 2020 23:57:36 +0000
Subject: net: linkmode: make linkmode_test_bit() take const pointer
Patch-mainline: v5.7-rc1
Git-commit: 8062e2333f8f7dcd5627e22b99e18d1cbb53eedb
References: bsc#1176447

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 include/linux/linkmode.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/linkmode.h
+++ b/include/linux/linkmode.h
@@ -71,7 +71,7 @@ static inline void linkmode_change_bit(i
 	__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);
 }