All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function
@ 2017-06-01  6:24 Leon Romanovsky
       [not found] ` <20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2017-06-01  6:24 UTC (permalink / raw)
  To: Doug Ledford, Selvin Xavier, Devesh Sharma
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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.

Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 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(-)

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 7ba9e699d7ab..c2a12b8fe8fb 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -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)
 {
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.h b/drivers/infiniband/hw/bnxt_re/ib_verbs.h
index 5c3d71765454..4e8d9010f112 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.h
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.h
@@ -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,
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 5d355401179b..6951f4b688d1 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function
       [not found] ` <20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-06-01 12:02   ` Dennis Dalessandro
  2017-06-05  8:25   ` Yuval Shaia
  2017-06-05 15:27   ` Selvin Xavier
  2 siblings, 0 replies; 5+ messages in thread
From: Dennis Dalessandro @ 2017-06-01 12:02 UTC (permalink / raw)
  To: Leon Romanovsky, Doug Ledford, Selvin Xavier, Devesh Sharma
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

On 6/1/2017 2:24 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> 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.
> 
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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:

Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

-Denny
--
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] 5+ messages in thread

* Re: [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function
       [not found] ` <20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-06-01 12:02   ` Dennis Dalessandro
@ 2017-06-05  8:25   ` Yuval Shaia
  2017-06-05 15:27   ` Selvin Xavier
  2 siblings, 0 replies; 5+ messages in thread
From: Yuval Shaia @ 2017-06-05  8:25 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Selvin Xavier, Devesh Sharma,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

On Thu, Jun 01, 2017 at 09:24:34AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> 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.
> 
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  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(-)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index 7ba9e699d7ab..c2a12b8fe8fb 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -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)
>  {
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.h b/drivers/infiniband/hw/bnxt_re/ib_verbs.h
> index 5c3d71765454..4e8d9010f112 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.h
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.h
> @@ -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,
> diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
> index 5d355401179b..6951f4b688d1 100644
> --- a/drivers/infiniband/hw/bnxt_re/main.c
> +++ b/drivers/infiniband/hw/bnxt_re/main.c
> @@ -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

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@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
--
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] 5+ messages in thread

* Re: [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function
       [not found] ` <20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-06-01 12:02   ` Dennis Dalessandro
  2017-06-05  8:25   ` Yuval Shaia
@ 2017-06-05 15:27   ` Selvin Xavier
       [not found]     ` <CA+sbYW3p-g1KgGDzc8XtVsQXb4ymqmK8QmPcdKiNsMdmp3e27g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Selvin Xavier @ 2017-06-05 15:27 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Devesh Sharma, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Leon Romanovsky

On Thu, Jun 1, 2017 at 11:54 AM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> 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.
>
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>


Acked-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

Thanks
Selvin Xavier
--
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] 5+ messages in thread

* Re: [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function
       [not found]     ` <CA+sbYW3p-g1KgGDzc8XtVsQXb4ymqmK8QmPcdKiNsMdmp3e27g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-07-28 17:51       ` Doug Ledford
  0 siblings, 0 replies; 5+ messages in thread
From: Doug Ledford @ 2017-07-28 17:51 UTC (permalink / raw)
  To: Selvin Xavier, Leon Romanovsky
  Cc: Devesh Sharma, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

On Mon, 2017-06-05 at 20:57 +0530, Selvin Xavier wrote:
> On Thu, Jun 1, 2017 at 11:54 AM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> wrote:
> > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > 
> > 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.
> > 
> > Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> 
> Acked-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-07-28 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01  6:24 [PATCH] RDMA/bnxt_re: Delete unsupported modify_port function Leon Romanovsky
     [not found] ` <20170601062434.22566-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-01 12:02   ` Dennis Dalessandro
2017-06-05  8:25   ` Yuval Shaia
2017-06-05 15:27   ` Selvin Xavier
     [not found]     ` <CA+sbYW3p-g1KgGDzc8XtVsQXb4ymqmK8QmPcdKiNsMdmp3e27g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-28 17:51       ` Doug Ledford

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.