Skip to content

Commit

Permalink
net/netlink: lockdep_genl_is_held can be boolean
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yaowei Bai authored and David S. Miller committed Oct 9, 2015
1 parent 8cec75b commit 61d0353
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion net/netlink/genetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 61d0353

Please sign in to comment.