diff mbox

[1/1] IB/rxe: make the variable static

Message ID 1522800501-28421-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhu Yanjun April 4, 2018, 12:08 a.m. UTC
The variable rxe_net_notifier is only used in the
file rxe_net.c. So remove it from rxe_net.h file
and make it static in the file rxe_net.c.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 drivers/infiniband/sw/rxe/rxe_net.c | 2 +-
 drivers/infiniband/sw/rxe/rxe_net.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Bart Van Assche April 4, 2018, 4:17 a.m. UTC | #1
On Tue, 2018-04-03 at 20:08 -0400, Zhu Yanjun wrote:
> The variable rxe_net_notifier is only used in the

> file rxe_net.c. So remove it from rxe_net.h file

> and make it static in the file rxe_net.c.


Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Yuval Shaia April 4, 2018, 1:34 p.m. UTC | #2
On Tue, Apr 03, 2018 at 08:08:20PM -0400, Zhu Yanjun wrote:
> The variable rxe_net_notifier is only used in the
> file rxe_net.c. So remove it from rxe_net.h file
> and make it static in the file rxe_net.c.
> 
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe April 18, 2018, 1:54 a.m. UTC | #3
On Tue, Apr 03, 2018 at 08:08:20PM -0400, Zhu Yanjun wrote:
> The variable rxe_net_notifier is only used in the
> file rxe_net.c. So remove it from rxe_net.h file
> and make it static in the file rxe_net.c.
> 
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_net.c | 2 +-
>  drivers/infiniband/sw/rxe/rxe_net.h | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

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

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 159246b..de0c962 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -665,7 +665,7 @@  static int rxe_notify(struct notifier_block *not_blk,
 	return NOTIFY_OK;
 }
 
-struct notifier_block rxe_net_notifier = {
+static struct notifier_block rxe_net_notifier = {
 	.notifier_call = rxe_notify,
 };
 
diff --git a/drivers/infiniband/sw/rxe/rxe_net.h b/drivers/infiniband/sw/rxe/rxe_net.h
index 728d8c7..15a0caf 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.h
+++ b/drivers/infiniband/sw/rxe/rxe_net.h
@@ -43,7 +43,6 @@  struct rxe_recv_sockets {
 	struct socket *sk6;
 };
 
-extern struct notifier_block rxe_net_notifier;
 void rxe_release_udp_tunnel(struct socket *sk);
 
 struct rxe_dev *rxe_net_add(struct net_device *ndev);