Re: [PATCH 2/5] RDMA/iwcm: Change the return type of iwcm_deref_id()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2024/6/5 16:50, Bart Van Assche 写道:
Since iwcm_deref_id() returns either 0 or 1, change its return type from
'int' into 'bool'.

Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

I am fine with this. Thanks a lot.

Reviewed-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>

Zhu Yanjun

---
  drivers/infiniband/core/iwcm.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 90d8f3d66990..ae9c12409f8a 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -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)

--
Best Regards,
Yanjun.Zhu





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux