mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 07:44:21 +08:00
RDMA/iwcm: Change the return type of iwcm_deref_id()
Since iwcm_deref_id() returns either 0 or 1, change its return type from 'int' into 'bool'. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240605145117.397751-3-bvanassche@acm.org Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
b1bc15f8fb
commit
fc772e38bc
@ -206,17 +206,17 @@ static void free_cm_id(struct iwcm_id_private *cm_id_priv)
|
||||
|
||||
/*
|
||||
* Release a reference on cm_id. If the last reference is being
|
||||
* released, free the cm_id and return 1.
|
||||
* released, free the cm_id and return 'true'.
|
||||
*/
|
||||
static int iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
|
||||
static bool iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
|
||||
{
|
||||
if (refcount_dec_and_test(&cm_id_priv->refcount)) {
|
||||
BUG_ON(!list_empty(&cm_id_priv->work_list));
|
||||
free_cm_id(cm_id_priv);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void add_ref(struct iw_cm_id *cm_id)
|
||||
|
Loading…
Reference in New Issue
Block a user