diff mbox

RDMA/core: Remove ib_find_cached_gid() and ib_find_cached_gid_by_port()

Message ID 20180705163838.18374-1-bart.vanassche@wdc.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Bart Van Assche July 5, 2018, 4:38 p.m. UTC
Remove these two functions since all their callers have been removed.
See also commit ea8c2d8f6014 ("RDMA/core: Remove unused ib cache
functions").

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
---
 drivers/infiniband/core/cache.c | 38 ---------------------------------
 1 file changed, 38 deletions(-)

Comments

Parav Pandit July 5, 2018, 4:52 p.m. UTC | #1
Hi Bart,

> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Bart Van Assche
> Sent: Thursday, July 05, 2018 11:39 AM
> To: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart
> Van Assche <bart.vanassche@wdc.com>
> Subject: [PATCH] RDMA/core: Remove ib_find_cached_gid() and
> ib_find_cached_gid_by_port()
> 
> Remove these two functions since all their callers have been removed.
> See also commit ea8c2d8f6014 ("RDMA/core: Remove unused ib cache
> functions").
> 
It is in Leon' queue at 
https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?h=rdma-next&id=fe6d5b68329ea431a92096726eec245c8f4316f9


> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> ---
>  drivers/infiniband/core/cache.c | 38 ---------------------------------
>  1 file changed, 38 deletions(-)
> 
> diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
> index 357a5cb328c7..c5fa67c72f23 100644
> --- a/drivers/infiniband/core/cache.c
> +++ b/drivers/infiniband/core/cache.c
> @@ -747,26 +747,6 @@ const struct ib_gid_attr *rdma_find_gid_by_filter(
>  	return res;
>  }
> 
> -int ib_find_cached_gid_by_port(struct ib_device *ib_dev,
> -			       const union ib_gid *gid,
> -			       enum ib_gid_type gid_type,
> -			       u8 port, struct net_device *ndev,
> -			       u16 *index)
> -{
> -	const struct ib_gid_attr *res;
> -
> -	res = rdma_find_gid_by_port(ib_dev, gid, gid_type, port, ndev);
> -	if (IS_ERR(res))
> -		return PTR_ERR(res);
> -
> -	if (index)
> -		*index = res->index;
> -	rdma_put_gid_attr(res);
> -	return 0;
> -
> -}
> -EXPORT_SYMBOL(ib_find_cached_gid_by_port);
> -
>  static struct ib_gid_table *alloc_gid_table(int sz)  {
>  	struct ib_gid_table *table = kzalloc(sizeof(*table), GFP_KERNEL); @@ -
> 1038,24 +1018,6 @@ const struct ib_gid_attr *rdma_find_gid(struct ib_device
> *device,  }  EXPORT_SYMBOL(rdma_find_gid);
> 
> -int ib_find_cached_gid(struct ib_device *device, const union ib_gid *gid,
> -		       enum ib_gid_type gid_type, struct net_device *ndev,
> -		       u8 *port_num, u16 *index)
> -{
> -	const struct ib_gid_attr *res;
> -
> -	res = rdma_find_gid(device, gid, gid_type, ndev);
> -	if (IS_ERR(res))
> -		return PTR_ERR(res);
> -	if (port_num)
> -		*port_num = res->port_num;
> -	if (index)
> -		*index = res->index;
> -	rdma_put_gid_attr(res);
> -	return 0;
> -}
> -EXPORT_SYMBOL(ib_find_cached_gid);
> -
>  int ib_get_cached_pkey(struct ib_device *device,
>  		       u8                port_num,
>  		       int               index,
> --
> 2.18.0
> 
> --
> 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
--
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 July 5, 2018, 4:55 p.m. UTC | #2
On Thu, Jul 05, 2018 at 04:52:35PM +0000, Parav Pandit wrote:
> Hi Bart,
> 
> > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > owner@vger.kernel.org] On Behalf Of Bart Van Assche
> > Sent: Thursday, July 05, 2018 11:39 AM
> > To: Jason Gunthorpe <jgg@ziepe.ca>
> > Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart
> > Van Assche <bart.vanassche@wdc.com>
> > Subject: [PATCH] RDMA/core: Remove ib_find_cached_gid() and
> > ib_find_cached_gid_by_port()
> > 
> > Remove these two functions since all their callers have been removed.
> > See also commit ea8c2d8f6014 ("RDMA/core: Remove unused ib cache
> > functions").
> > 
> It is in Leon' queue at 
> https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?h=rdma-next&id=fe6d5b68329ea431a92096726eec245c8f4316f9

Bart's patch does two functions, I'm inclined to take his version?

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
Parav Pandit July 5, 2018, 4:58 p.m. UTC | #3
> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Jason Gunthorpe
> Sent: Thursday, July 05, 2018 11:56 AM
> To: Parav Pandit <parav@mellanox.com>
> Cc: Bart Van Assche <bart.vanassche@wdc.com>; Doug Ledford
> <dledford@redhat.com>; linux-rdma@vger.kernel.org
> Subject: Re: [PATCH] RDMA/core: Remove ib_find_cached_gid() and
> ib_find_cached_gid_by_port()
> 
> On Thu, Jul 05, 2018 at 04:52:35PM +0000, Parav Pandit wrote:
> > Hi Bart,
> >
> > > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > > owner@vger.kernel.org] On Behalf Of Bart Van Assche
> > > Sent: Thursday, July 05, 2018 11:39 AM
> > > To: Jason Gunthorpe <jgg@ziepe.ca>
> > > Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org;
> > > Bart Van Assche <bart.vanassche@wdc.com>
> > > Subject: [PATCH] RDMA/core: Remove ib_find_cached_gid() and
> > > ib_find_cached_gid_by_port()
> > >
> > > Remove these two functions since all their callers have been removed.
> > > See also commit ea8c2d8f6014 ("RDMA/core: Remove unused ib cache
> > > functions").
> > >
> > It is in Leon' queue at
> > https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/co
> > mmit/?h=rdma-next&id=fe6d5b68329ea431a92096726eec245c8f4316f9
> 
> Bart's patch does two functions, I'm inclined to take his version?
> 
Yes, I noticed now.
Looks fine to me.

Leon,
Please drop https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?h=rdma-next&id=fe6d5b68329ea431a92096726eec245c8f4316f9
--
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 July 9, 2018, 6:14 p.m. UTC | #4
On Thu, Jul 05, 2018 at 09:38:38AM -0700, Bart Van Assche wrote:
> Remove these two functions since all their callers have been removed.
> See also commit ea8c2d8f6014 ("RDMA/core: Remove unused ib cache
> functions").
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> ---
>  drivers/infiniband/core/cache.c | 38 ---------------------------------
>  1 file changed, 38 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/core/cache.c b/drivers/infiniband/core/cache.c
index 357a5cb328c7..c5fa67c72f23 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -747,26 +747,6 @@  const struct ib_gid_attr *rdma_find_gid_by_filter(
 	return res;
 }
 
-int ib_find_cached_gid_by_port(struct ib_device *ib_dev,
-			       const union ib_gid *gid,
-			       enum ib_gid_type gid_type,
-			       u8 port, struct net_device *ndev,
-			       u16 *index)
-{
-	const struct ib_gid_attr *res;
-
-	res = rdma_find_gid_by_port(ib_dev, gid, gid_type, port, ndev);
-	if (IS_ERR(res))
-		return PTR_ERR(res);
-
-	if (index)
-		*index = res->index;
-	rdma_put_gid_attr(res);
-	return 0;
-
-}
-EXPORT_SYMBOL(ib_find_cached_gid_by_port);
-
 static struct ib_gid_table *alloc_gid_table(int sz)
 {
 	struct ib_gid_table *table = kzalloc(sizeof(*table), GFP_KERNEL);
@@ -1038,24 +1018,6 @@  const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
 }
 EXPORT_SYMBOL(rdma_find_gid);
 
-int ib_find_cached_gid(struct ib_device *device, const union ib_gid *gid,
-		       enum ib_gid_type gid_type, struct net_device *ndev,
-		       u8 *port_num, u16 *index)
-{
-	const struct ib_gid_attr *res;
-
-	res = rdma_find_gid(device, gid, gid_type, ndev);
-	if (IS_ERR(res))
-		return PTR_ERR(res);
-	if (port_num)
-		*port_num = res->port_num;
-	if (index)
-		*index = res->index;
-	rdma_put_gid_attr(res);
-	return 0;
-}
-EXPORT_SYMBOL(ib_find_cached_gid);
-
 int ib_get_cached_pkey(struct ib_device *device,
 		       u8                port_num,
 		       int               index,