From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: haris.iqbal@ionos.com, jinpu.wang@ionos.com, axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: [PATCH 2/3] rnbd-srv: make process_msg_close returns void
Date: Tue, 30 Aug 2022 20:39:03 +0800 [thread overview]
Message-ID: <20220830123904.26671-3-guoqing.jiang@linux.dev> (raw)
In-Reply-To: <20220830123904.26671-1-guoqing.jiang@linux.dev>
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(-)
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);
--
2.34.1
next prev parent reply other threads:[~2022-08-30 12:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 12:39 [PATCH 0/3] Small changes for rnbd-srv Guoqing Jiang
2022-08-30 12:39 ` [PATCH 1/3] rnbd-srv: fix the return value of rnbd_srv_rdma_ev Guoqing Jiang
2022-08-30 12:49 ` Chaitanya Kulkarni
2022-08-30 13:28 ` Haris Iqbal
2022-08-30 15:10 ` Guoqing Jiang
2022-08-30 15:50 ` Jinpu Wang
2022-08-30 12:39 ` Guoqing Jiang [this message]
2022-08-30 13:04 ` [PATCH 2/3] rnbd-srv: make process_msg_close returns void Chaitanya Kulkarni
2022-08-30 13:31 ` Haris Iqbal
2022-08-30 12:39 ` [PATCH 3/3] rnbd-srv: remove redundant setting of blk_open_flags Guoqing Jiang
2022-08-30 13:01 ` Chaitanya Kulkarni
2022-08-30 13:30 ` Haris Iqbal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220830123904.26671-3-guoqing.jiang@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=axboe@kernel.dk \
--cc=haris.iqbal@ionos.com \
--cc=jinpu.wang@ionos.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).