]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/core: lockdep_rtnl_is_held can be boolean
authorYaowei Bai <bywxiaobai@163.com>
Thu, 8 Oct 2015 13:29:02 +0000 (21:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Oct 2015 14:49:06 +0000 (07:49 -0700)
This patch makes lockdep_rtnl_is_held return bool due to this
particular function only using either one or zero as its return
value.

In another patch lockdep_is_held is also made return bool.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/rtnetlink.h
net/core/rtnetlink.c

index 39adaa9529eb328c049ad650021363bf83122088..4be5048b1fbe70b106d1802f6b400e5a8c259ba6 100644 (file)
@@ -33,11 +33,11 @@ extern wait_queue_head_t netdev_unregistering_wq;
 extern struct mutex net_mutex;
 
 #ifdef CONFIG_PROVE_LOCKING
-extern int lockdep_rtnl_is_held(void);
+extern bool lockdep_rtnl_is_held(void);
 #else
-static inline int lockdep_rtnl_is_held(void)
+static inline bool lockdep_rtnl_is_held(void)
 {
-       return 1;
+       return true;
 }
 #endif /* #ifdef CONFIG_PROVE_LOCKING */
 
index b2258a36d8944564f795ed4a394cbff96020f939..24775953fa68e03445ba4eaaf3640808782ea744 100644 (file)
@@ -96,7 +96,7 @@ int rtnl_is_locked(void)
 EXPORT_SYMBOL(rtnl_is_locked);
 
 #ifdef CONFIG_PROVE_LOCKING
-int lockdep_rtnl_is_held(void)
+bool lockdep_rtnl_is_held(void)
 {
        return lockdep_is_held(&rtnl_mutex);
 }