diff mbox series

[for-next,10/10] RDMA/rtrs: remove (void) casting for functions

Message ID 20210730131832.118865-11-jinpu.wang@ionos.com (mailing list archive)
State Changes Requested
Headers show
Series Misc update for RTRS | expand

Commit Message

Jinpu Wang July 30, 2021, 1:18 p.m. UTC
From: Gioh Kim <gi-oh.kim@ionos.com>

As recommended by Leon
https://www.spinics.net/lists/linux-rdma/msg102200.html
this patch removes (void) casting because that does nothing.

Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
 drivers/infiniband/ulp/rtrs/rtrs-srv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Leon Romanovsky Aug. 2, 2021, 7:32 a.m. UTC | #1
On Fri, Jul 30, 2021 at 03:18:32PM +0200, Jack Wang wrote:
> From: Gioh Kim <gi-oh.kim@ionos.com>
> 
> As recommended by Leon
> https://www.spinics.net/lists/linux-rdma/msg102200.html
> this patch removes (void) casting because that does nothing.
> 
> Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
> Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/infiniband/ulp/rtrs/rtrs-srv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

I would write the commit message differently:

------

Casting to (void) does nothing, remove them.

Link: https://www.spinics.net/lists/linux-rdma/msg102200.html
Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Md Haris Iqbal Aug. 2, 2021, 2:16 p.m. UTC | #2
On Mon, Aug 2, 2021 at 9:33 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> On Fri, Jul 30, 2021 at 03:18:32PM +0200, Jack Wang wrote:
> > From: Gioh Kim <gi-oh.kim@ionos.com>
> >
> > As recommended by Leon
> > https://www.spinics.net/lists/linux-rdma/msg102200.html
> > this patch removes (void) casting because that does nothing.
> >
> > Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
> > Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
> > Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> > ---
> >  drivers/infiniband/ulp/rtrs/rtrs-srv.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
>
> I would write the commit message differently:
>
> ------
>
> Casting to (void) does nothing, remove them.
>
> Link: https://www.spinics.net/lists/linux-rdma/msg102200.html
> Suggested-by: Leon Romanovsky <leon@kernel.org>

Thanks Leon. Will change and resend.

> Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
> Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
index 90d833041ccf..7d6df83eb636 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
@@ -1918,7 +1918,7 @@  static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
 	err = create_con(sess, cm_id, cid);
 	if (err) {
 		rtrs_err((&sess->s), "create_con(), error %d\n", err);
-		(void)rtrs_rdma_do_reject(cm_id, err);
+		rtrs_rdma_do_reject(cm_id, err);
 		/*
 		 * Since session has other connections we follow normal way
 		 * through workqueue, but still return an error to tell cma.c
@@ -1929,7 +1929,7 @@  static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
 	err = rtrs_rdma_do_accept(sess, cm_id);
 	if (err) {
 		rtrs_err((&sess->s), "rtrs_rdma_do_accept(), error %d\n", err);
-		(void)rtrs_rdma_do_reject(cm_id, err);
+		rtrs_rdma_do_reject(cm_id, err);
 		/*
 		 * Since current connection was successfully added to the
 		 * session we follow normal way through workqueue to close the