Commit 875e0829 authored by Yaowei Bai's avatar Yaowei Bai Committed by David S. Miller

net/nfnetlink: lockdep_nfnl_is_held can be boolean

This patch makes lockdep_nfnl_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: default avatarYaowei Bai <bywxiaobai@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 35498edc
...@@ -45,11 +45,11 @@ int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid, ...@@ -45,11 +45,11 @@ int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
void nfnl_lock(__u8 subsys_id); void nfnl_lock(__u8 subsys_id);
void nfnl_unlock(__u8 subsys_id); void nfnl_unlock(__u8 subsys_id);
#ifdef CONFIG_PROVE_LOCKING #ifdef CONFIG_PROVE_LOCKING
int lockdep_nfnl_is_held(__u8 subsys_id); bool lockdep_nfnl_is_held(__u8 subsys_id);
#else #else
static inline int lockdep_nfnl_is_held(__u8 subsys_id) static inline bool lockdep_nfnl_is_held(__u8 subsys_id)
{ {
return 1; return true;
} }
#endif /* CONFIG_PROVE_LOCKING */ #endif /* CONFIG_PROVE_LOCKING */
......
...@@ -64,7 +64,7 @@ void nfnl_unlock(__u8 subsys_id) ...@@ -64,7 +64,7 @@ void nfnl_unlock(__u8 subsys_id)
EXPORT_SYMBOL_GPL(nfnl_unlock); EXPORT_SYMBOL_GPL(nfnl_unlock);
#ifdef CONFIG_PROVE_LOCKING #ifdef CONFIG_PROVE_LOCKING
int lockdep_nfnl_is_held(u8 subsys_id) bool lockdep_nfnl_is_held(u8 subsys_id)
{ {
return lockdep_is_held(&table[subsys_id].mutex); return lockdep_is_held(&table[subsys_id].mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment