diff mbox series

[09/10] block/rnbd-srv: make process_msg_sess_info returns void

Message ID 20230523075331.32250-10-guoqing.jiang@linux.dev (mailing list archive)
State New, archived
Headers show
Series misc patches for rnbd | expand

Commit Message

Guoqing Jiang May 23, 2023, 7:53 a.m. UTC
Change the return type to void given it always returns 0.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/block/rnbd/rnbd-srv.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Jinpu Wang May 23, 2023, 9:32 a.m. UTC | #1
On Tue, May 23, 2023 at 9:53 AM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> Change the return type to void given it always returns 0.
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/block/rnbd/rnbd-srv.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
> index 1fdf3366135a..d678ffa50c5c 100644
> --- a/drivers/block/rnbd/rnbd-srv.c
> +++ b/drivers/block/rnbd/rnbd-srv.c
> @@ -352,7 +352,7 @@ static int process_msg_open(struct rnbd_srv_session *srv_sess,
>                             const void *msg, size_t len,
>                             void *data, size_t datalen);
>
> -static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
> +static void process_msg_sess_info(struct rnbd_srv_session *srv_sess,
>                                  const void *msg, size_t len,
>                                  void *data, size_t datalen);
>
> @@ -380,8 +380,7 @@ static int rnbd_srv_rdma_ev(void *priv, struct rtrs_srv_op *id,
>                 ret = process_msg_open(srv_sess, usr, usrlen, data, datalen);
>                 break;
>         case RNBD_MSG_SESS_INFO:
> -               ret = process_msg_sess_info(srv_sess, usr, usrlen, data,
> -                                           datalen);
> +               process_msg_sess_info(srv_sess, usr, usrlen, data, datalen);
>                 break;
>         default:
>                 pr_warn("Received unexpected message type %d from session %s\n",
> @@ -626,7 +625,7 @@ static char *rnbd_srv_get_full_path(struct rnbd_srv_session *srv_sess,
>         return full_path;
>  }
>
> -static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
> +static void process_msg_sess_info(struct rnbd_srv_session *srv_sess,
>                                  const void *msg, size_t len,
>                                  void *data, size_t datalen)
>  {
> @@ -639,8 +638,6 @@ static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
>
>         rsp->hdr.type = cpu_to_le16(RNBD_MSG_SESS_INFO_RSP);
>         rsp->ver = srv_sess->ver;
> -
> -       return 0;
>  }
>
>  /**
> --
> 2.35.3
>
diff mbox series

Patch

diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
index 1fdf3366135a..d678ffa50c5c 100644
--- a/drivers/block/rnbd/rnbd-srv.c
+++ b/drivers/block/rnbd/rnbd-srv.c
@@ -352,7 +352,7 @@  static int process_msg_open(struct rnbd_srv_session *srv_sess,
 			    const void *msg, size_t len,
 			    void *data, size_t datalen);
 
-static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
+static void process_msg_sess_info(struct rnbd_srv_session *srv_sess,
 				 const void *msg, size_t len,
 				 void *data, size_t datalen);
 
@@ -380,8 +380,7 @@  static int rnbd_srv_rdma_ev(void *priv, struct rtrs_srv_op *id,
 		ret = process_msg_open(srv_sess, usr, usrlen, data, datalen);
 		break;
 	case RNBD_MSG_SESS_INFO:
-		ret = process_msg_sess_info(srv_sess, usr, usrlen, data,
-					    datalen);
+		process_msg_sess_info(srv_sess, usr, usrlen, data, datalen);
 		break;
 	default:
 		pr_warn("Received unexpected message type %d from session %s\n",
@@ -626,7 +625,7 @@  static char *rnbd_srv_get_full_path(struct rnbd_srv_session *srv_sess,
 	return full_path;
 }
 
-static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
+static void process_msg_sess_info(struct rnbd_srv_session *srv_sess,
 				 const void *msg, size_t len,
 				 void *data, size_t datalen)
 {
@@ -639,8 +638,6 @@  static int process_msg_sess_info(struct rnbd_srv_session *srv_sess,
 
 	rsp->hdr.type = cpu_to_le16(RNBD_MSG_SESS_INFO_RSP);
 	rsp->ver = srv_sess->ver;
-
-	return 0;
 }
 
 /**