diff options
author | Yaowei Bai <bywxiaobai@163.com> | 2015-10-08 13:28:54 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-09 14:48:59 (GMT) |
commit | 61d03535e4be3a46c1e171a25458237e343195e3 (patch) | |
tree | bb15489d3229944346f8299373a79c275eb423b1 | |
parent | 8cec75bd85cc26f81e85eb20e863cc564d354113 (diff) | |
download | linux-61d03535e4be3a46c1e171a25458237e343195e3.tar.xz |
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>
-rw-r--r-- | include/linux/genetlink.h | 2 | ||||
-rw-r--r-- | net/netlink/genetlink.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index 09460d6..a4c61cb 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h @@ -8,7 +8,7 @@ extern void genl_lock(void); extern void genl_unlock(void); #ifdef CONFIG_LOCKDEP -extern int lockdep_genl_is_held(void); +extern bool lockdep_genl_is_held(void); #endif /* for synchronisation between af_netlink and genetlink */ diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 75724a9..bc0e504 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -39,7 +39,7 @@ void genl_unlock(void) EXPORT_SYMBOL(genl_unlock); #ifdef CONFIG_LOCKDEP -int lockdep_genl_is_held(void) +bool lockdep_genl_is_held(void) { return lockdep_is_held(&genl_mutex); } |