diff mbox series

[2/3] rnbd-srv: make process_msg_close returns void

Message ID 20220830123904.26671-3-guoqing.jiang@linux.dev (mailing list archive)
State New, archived
Headers show
Series Small changes for rnbd-srv | expand

Commit Message

Guoqing Jiang Aug. 30, 2022, 12:39 p.m. UTC
Change the return type to void given it always returns 0.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
process_msg_sess_info also returns 0, to avoid conflict with rdma tree,
will send it in next merge window.

 drivers/block/rnbd/rnbd-srv.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Chaitanya Kulkarni Aug. 30, 2022, 1:04 p.m. UTC | #1
On 8/30/22 05:39, Guoqing Jiang wrote:
> Change the return type to void given it always returns 0.
> 
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Haris Iqbal Aug. 30, 2022, 1:31 p.m. UTC | #2
On Tue, Aug 30, 2022 at 3:04 PM Chaitanya Kulkarni
<chaitanyak@nvidia.com> wrote:
>
> On 8/30/22 05:39, Guoqing Jiang wrote:
> > Change the return type to void given it always returns 0.
> >
> > Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> > ---
>
>
> Looks good.
>
> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

This looks good,

Acked-by: Md Haris Iqbal <haris.iqbal@ionos.com>

>
>
diff mbox series

Patch

diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
index 9182d45cb9be..026681a70c46 100644
--- a/drivers/block/rnbd/rnbd-srv.c
+++ b/drivers/block/rnbd/rnbd-srv.c
@@ -339,7 +339,7 @@  void rnbd_srv_sess_dev_force_close(struct rnbd_srv_sess_dev *sess_dev,
 	mutex_unlock(&sess->lock);
 }
 
-static int process_msg_close(struct rnbd_srv_session *srv_sess,
+static void process_msg_close(struct rnbd_srv_session *srv_sess,
 			     void *data, size_t datalen, const void *usr,
 			     size_t usrlen)
 {
@@ -351,13 +351,12 @@  static int process_msg_close(struct rnbd_srv_session *srv_sess,
 	sess_dev = rnbd_get_sess_dev(le32_to_cpu(close_msg->device_id),
 				      srv_sess);
 	if (IS_ERR(sess_dev))
-		return 0;
+		return;
 
 	rnbd_put_sess_dev(sess_dev);
 	mutex_lock(&srv_sess->lock);
 	rnbd_srv_destroy_dev_session_sysfs(sess_dev);
 	mutex_unlock(&srv_sess->lock);
-	return 0;
 }
 
 static int process_msg_open(struct rnbd_srv_session *srv_sess,
@@ -387,7 +386,7 @@  static int rnbd_srv_rdma_ev(void *priv,
 	case RNBD_MSG_IO:
 		return process_rdma(srv_sess, id, data, datalen, usr, usrlen);
 	case RNBD_MSG_CLOSE:
-		ret = process_msg_close(srv_sess, data, datalen, usr, usrlen);
+		process_msg_close(srv_sess, data, datalen, usr, usrlen);
 		break;
 	case RNBD_MSG_OPEN:
 		ret = process_msg_open(srv_sess, usr, usrlen, data, datalen);