net/core: lockdep_rtnl_is_held can be boolean
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>
This commit is contained in:

committed by
David S. Miller

parent
f06cc7b284
commit
0cbf334376
@@ -33,11 +33,11 @@ extern wait_queue_head_t netdev_unregistering_wq;
|
|||||||
extern struct mutex net_mutex;
|
extern struct mutex net_mutex;
|
||||||
|
|
||||||
#ifdef CONFIG_PROVE_LOCKING
|
#ifdef CONFIG_PROVE_LOCKING
|
||||||
extern int lockdep_rtnl_is_held(void);
|
extern bool lockdep_rtnl_is_held(void);
|
||||||
#else
|
#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 */
|
#endif /* #ifdef CONFIG_PROVE_LOCKING */
|
||||||
|
|
||||||
|
@@ -96,7 +96,7 @@ int rtnl_is_locked(void)
|
|||||||
EXPORT_SYMBOL(rtnl_is_locked);
|
EXPORT_SYMBOL(rtnl_is_locked);
|
||||||
|
|
||||||
#ifdef CONFIG_PROVE_LOCKING
|
#ifdef CONFIG_PROVE_LOCKING
|
||||||
int lockdep_rtnl_is_held(void)
|
bool lockdep_rtnl_is_held(void)
|
||||||
{
|
{
|
||||||
return lockdep_is_held(&rtnl_mutex);
|
return lockdep_is_held(&rtnl_mutex);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user