All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] IB/core: change the return type to void
@ 2017-04-01  3:42 Zhu Yanjun
       [not found] ` <1491018175-16622-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Yanjun @ 2017-04-01  3:42 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

The function ib_unregister_mad_agent always returns zero. And
this returned value is not checked. As such, chane the return
type to void.

CC: Joe Jin <joe.jin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/core/mad.c | 3 +--
 include/rdma/ib_mad.h         | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 57f231f..8a2ceb4 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -605,7 +605,7 @@ static void unregister_mad_snoop(struct ib_mad_snoop_private *mad_snoop_priv)
 /*
  * ib_unregister_mad_agent - Unregisters a client from using MAD services
  */
-int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
+void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
 {
 	struct ib_mad_agent_private *mad_agent_priv;
 	struct ib_mad_snoop_private *mad_snoop_priv;
@@ -622,7 +622,6 @@ int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
 					      agent);
 		unregister_mad_snoop(mad_snoop_priv);
 	}
-	return 0;
 }
 EXPORT_SYMBOL(ib_unregister_mad_agent);
 
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index 981214b..42814a0 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -673,7 +673,7 @@ struct ib_mad_agent *ib_register_mad_snoop(struct ib_device *device,
  * After invoking this routine, MAD services are no longer usable by the
  * client on the associated QP.
  */
-int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
+void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
 
 /**
  * ib_post_send_mad - Posts MAD(s) to the send queue of the QP associated
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] IB/core: change the return type to void
       [not found] ` <1491018175-16622-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-04-03  7:00   ` Yuval Shaia
  2017-04-03 14:49   ` Hal Rosenstock
  1 sibling, 0 replies; 3+ messages in thread
From: Yuval Shaia @ 2017-04-03  7:00 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, leon-DgEjT+Ai2ygdnm+yROfE0A

On Fri, Mar 31, 2017 at 11:42:55PM -0400, Zhu Yanjun wrote:
> The function ib_unregister_mad_agent always returns zero. And
> this returned value is not checked. As such, chane the return
> type to void.
> 
> CC: Joe Jin <joe.jin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

> ---
>  drivers/infiniband/core/mad.c | 3 +--
>  include/rdma/ib_mad.h         | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index 57f231f..8a2ceb4 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -605,7 +605,7 @@ static void unregister_mad_snoop(struct ib_mad_snoop_private *mad_snoop_priv)
>  /*
>   * ib_unregister_mad_agent - Unregisters a client from using MAD services
>   */
> -int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
> +void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
>  {
>  	struct ib_mad_agent_private *mad_agent_priv;
>  	struct ib_mad_snoop_private *mad_snoop_priv;
> @@ -622,7 +622,6 @@ int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
>  					      agent);
>  		unregister_mad_snoop(mad_snoop_priv);
>  	}
> -	return 0;
>  }
>  EXPORT_SYMBOL(ib_unregister_mad_agent);
>  
> diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
> index 981214b..42814a0 100644
> --- a/include/rdma/ib_mad.h
> +++ b/include/rdma/ib_mad.h
> @@ -673,7 +673,7 @@ struct ib_mad_agent *ib_register_mad_snoop(struct ib_device *device,
>   * After invoking this routine, MAD services are no longer usable by the
>   * client on the associated QP.
>   */
> -int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
> +void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
>  
>  /**
>   * ib_post_send_mad - Posts MAD(s) to the send queue of the QP associated
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] IB/core: change the return type to void
       [not found] ` <1491018175-16622-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2017-04-03  7:00   ` Yuval Shaia
@ 2017-04-03 14:49   ` Hal Rosenstock
  1 sibling, 0 replies; 3+ messages in thread
From: Hal Rosenstock @ 2017-04-03 14:49 UTC (permalink / raw)
  To: Zhu Yanjun, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

On 3/31/2017 11:42 PM, Zhu Yanjun wrote:
> The function ib_unregister_mad_agent always returns zero. And
> this returned value is not checked. As such, change the return
> type to void.
> 
> CC: Joe Jin <joe.jin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Reviewed-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-03 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01  3:42 [PATCH 1/1] IB/core: change the return type to void Zhu Yanjun
     [not found] ` <1491018175-16622-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-03  7:00   ` Yuval Shaia
2017-04-03 14:49   ` Hal Rosenstock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.