Skip to contentSkip to conversation

RDMA/bnxt_re: Delete unsupported modify_port function

PATCH Applied Leon Romanovsky 5 participants 5 messages Jun 1, 2017 – Jul 28, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Delete unsupported modify_port function

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

There is no need to return always zero for function which is not supported. The IB stack treats uninitialized ib_device->functions as not implemented.

---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 17 -----------------
 drivers/infiniband/hw/bnxt_re/ib_verbs.h |  3 ---
 drivers/infiniband/hw/bnxt_re/main.c     |  1 -
 3 files changed, 21 deletions(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +0 -17
index 7ba9e699d7ab..c2a12b8fe8fb 100644
@@ -271,23 +271,6 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
 	return 0;
 }
 
-int bnxt_re_modify_port(struct ib_device *ibdev, u8 port_num,
-			int port_modify_mask,
-			struct ib_port_modify *port_modify)
-{
-	switch (port_modify_mask) {
-	case IB_PORT_SHUTDOWN:
-		break;
-	case IB_PORT_INIT_TYPE:
-		break;
-	case IB_PORT_RESET_QKEY_CNTR:
-		break;
-	default:
-		break;
-	}
-	return 0;
-}
-
 int bnxt_re_get_port_immutable(struct ib_device *ibdev, u8 port_num,
 			       struct ib_port_immutable *immutable)
 {
drivers/infiniband/hw/bnxt_re/ib_verbs.h +0 -3
index 5c3d71765454..4e8d9010f112 100644
@@ -129,9 +129,6 @@ int bnxt_re_modify_device(struct ib_device *ibdev,
 			  struct ib_device_modify *device_modify);
 int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
 		       struct ib_port_attr *port_attr);
-int bnxt_re_modify_port(struct ib_device *ibdev, u8 port_num,
-			int port_modify_mask,
-			struct ib_port_modify *port_modify);
 int bnxt_re_get_port_immutable(struct ib_device *ibdev, u8 port_num,
 			       struct ib_port_immutable *immutable);
 int bnxt_re_query_pkey(struct ib_device *ibdev, u8 port_num,
drivers/infiniband/hw/bnxt_re/main.c +0 -1
index 5d355401179b..6951f4b688d1 100644
@@ -473,7 +473,6 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev)
 	ibdev->modify_device		= bnxt_re_modify_device;
 
 	ibdev->query_port		= bnxt_re_query_port;
-	ibdev->modify_port		= bnxt_re_modify_port;
 	ibdev->get_port_immutable	= bnxt_re_get_port_immutable;
 	ibdev->query_pkey		= bnxt_re_query_pkey;
 	ibdev->query_gid		= bnxt_re_query_gid;

--
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 7 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

There is no need to return always zero for function which is not supported. The IB stack treats uninitialized ib_device->functions as not implemented.

If there are plans to actually do something here for-next I think the function could stay, but if not then I agree just remove it and:

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 68 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

There is no need to return always zero for function which is not supported. The IB stack treats uninitialized ib_device->functions as not implemented.

---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 17 -----------------
 drivers/infiniband/hw/bnxt_re/ib_verbs.h |  3 ---
 drivers/infiniband/hw/bnxt_re/main.c     |  1 -
 3 files changed, 21 deletions(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +0 -17
index 7ba9e699d7ab..c2a12b8fe8fb 100644
@@ -271,23 +271,6 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
 	return 0;
 }
 
-int bnxt_re_modify_port(struct ib_device *ibdev, u8 port_num,
-			int port_modify_mask,
-			struct ib_port_modify *port_modify)
-{
-	switch (port_modify_mask) {
-	case IB_PORT_SHUTDOWN:
-		break;
-	case IB_PORT_INIT_TYPE:
-		break;
-	case IB_PORT_RESET_QKEY_CNTR:
-		break;
-	default:
-		break;
-	}
-	return 0;
-}
-
 int bnxt_re_get_port_immutable(struct ib_device *ibdev, u8 port_num,
 			       struct ib_port_immutable *immutable)
 {
drivers/infiniband/hw/bnxt_re/ib_verbs.h +0 -3
index 5c3d71765454..4e8d9010f112 100644
@@ -129,9 +129,6 @@ int bnxt_re_modify_device(struct ib_device *ibdev,
 			  struct ib_device_modify *device_modify);
 int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
 		       struct ib_port_attr *port_attr);
-int bnxt_re_modify_port(struct ib_device *ibdev, u8 port_num,
-			int port_modify_mask,
-			struct ib_port_modify *port_modify);
 int bnxt_re_get_port_immutable(struct ib_device *ibdev, u8 port_num,
 			       struct ib_port_immutable *immutable);
 int bnxt_re_query_pkey(struct ib_device *ibdev, u8 port_num,
drivers/infiniband/hw/bnxt_re/main.c +0 -2
index 5d355401179b..6951f4b688d1 100644
@@ -473,7 +473,6 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev)
 	ibdev->modify_device		= bnxt_re_modify_device;
 
 	ibdev->query_port		= bnxt_re_query_port;
-	ibdev->modify_port		= bnxt_re_modify_port;
 	ibdev->get_port_immutable	= bnxt_re_get_port_immutable;
 	ibdev->query_pkey		= bnxt_re_query_pkey;
 	ibdev->query_gid		= bnxt_re_query_gid;
--
Quoted 1 line

2.12.2

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by
#4 lore raw
In reply to a message not in the archive
Quoted 7 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

There is no need to return always zero for function which is not supported. The IB stack treats uninitialized ib_device->functions as not implemented.

Thanks
Selvin Xavier
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CA+sbYW3p-g1KgGDzc8XtVsQXb4ymqmK8QmPcdKiNsMdmp3e27g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Applied
#6 lore raw
Quoted 9 lines · Selvin Xavier
Quoted 7 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

There is no need to return always zero for function which is not supported. The IB stack treats uninitialized ib_device->functions as
not implemented.

Quoted 4 lines
Quoted 1 line

Thanks, applied.

Signature · 8 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html