Browse Source

net/netlink: lockdep_genl_is_held can be boolean

This patch makes lockdep_genl_is_held return bool to improve
readability due to this particular function only using either
one or zero as its return value.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaowei Bai 9 years ago
parent
commit
61d03535e4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/linux/genetlink.h
  2. 1 1
      net/netlink/genetlink.c

+ 1 - 1
include/linux/genetlink.h

@@ -8,7 +8,7 @@
 extern void genl_lock(void);
 extern void genl_lock(void);
 extern void genl_unlock(void);
 extern void genl_unlock(void);
 #ifdef CONFIG_LOCKDEP
 #ifdef CONFIG_LOCKDEP
-extern int lockdep_genl_is_held(void);
+extern bool lockdep_genl_is_held(void);
 #endif
 #endif
 
 
 /* for synchronisation between af_netlink and genetlink */
 /* for synchronisation between af_netlink and genetlink */

+ 1 - 1
net/netlink/genetlink.c

@@ -39,7 +39,7 @@ void genl_unlock(void)
 EXPORT_SYMBOL(genl_unlock);
 EXPORT_SYMBOL(genl_unlock);
 
 
 #ifdef CONFIG_LOCKDEP
 #ifdef CONFIG_LOCKDEP
-int lockdep_genl_is_held(void)
+bool lockdep_genl_is_held(void)
 {
 {
 	return lockdep_is_held(&genl_mutex);
 	return lockdep_is_held(&genl_mutex);
 }
 }