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


Groups > linux.kernel > #1741180

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

From "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Newsgroups linux.kernel
Subject [PATCH for-next 7/9] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function
Date 2017-09-28 06:40 +0200
Message-ID <uuyMa-4cw-31@gated-at.bofh.it> (permalink)
References <uuyCt-49t-3@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 4f43c91..06f3dad 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 7a0c1e8..8fe8247 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -419,7 +419,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 for-next 0/9] Bug fixes & Code improvements in hip06 and hip08 RoCE driver "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 06:40 +0200
  [PATCH for-next 7/9] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 06:40 +0200
  [PATCH for-next 6/9] RDMA/hns: Add return statement when checking error in hns_roce_v1_mr_free_work_fn "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 06:40 +0200
  [PATCH for-next 2/9] RDMA/hns: Factor out the code for checking sdb status into a new function "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 06:40 +0200
    Re: [PATCH for-next 2/9] RDMA/hns: Factor out the code for checking  sdb status into a new function Leon Romanovsky <leon@kernel.org> - 2017-09-28 16:00 +0200
      Re: [PATCH for-next 2/9] RDMA/hns: Factor out the code for checking  sdb status into a new function "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-29 04:10 +0200

csiph-web