Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742178

[PATCH V2 for-next 7/8] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function

From "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Newsgroups linux.kernel
Subject [PATCH V2 for-next 7/8] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function
Date 2017-09-29 16:50 +0200
Message-ID <uv4M3-7tm-55@gated-at.bofh.it> (permalink)
References <uv4M2-7tm-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Lijun Ou <oulijun@huawei.com>

When the driver doesn't call register_inetaddr_notifier function, it need
not call unregister_inetaddr_notifier to unregister inet addr. This patch
fixes it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_device.h | 1 -
 drivers/infiniband/hw/hns/hns_roce_main.c   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
index 4d9d5d7..b314ac0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_device.h
+++ b/drivers/infiniband/hw/hns/hns_roce_device.h
@@ -474,7 +474,6 @@ struct hns_roce_ib_iboe {
 	spinlock_t		lock;
 	struct net_device      *netdevs[HNS_ROCE_MAX_PORTS];
 	struct notifier_block	nb;
-	struct notifier_block	nb_inet;
 	u8			phy_port[HNS_ROCE_MAX_PORTS];
 };
 
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 6f2d572..3dcb2df 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -424,7 +424,6 @@ static void hns_roce_unregister_device(struct hns_roce_dev *hr_dev)
 {
 	struct hns_roce_ib_iboe *iboe = &hr_dev->iboe;
 
-	unregister_inetaddr_notifier(&iboe->nb_inet);
 	unregister_netdevice_notifier(&iboe->nb);
 	ib_unregister_device(&hr_dev->ib_dev);
 }
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 for-next 0/8] Bug fixes & Code improvements in hip06 and hip08 RoCE driver "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-29 16:50 +0200
  [PATCH V2 for-next 7/8] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-29 16:50 +0200
  Re: [PATCH V2 for-next 0/8] Bug fixes & Code improvements in hip06  and hip08 RoCE driver Doug Ledford <dledford@redhat.com> - 2017-09-29 18:30 +0200

csiph-web