diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-19 10:59:21 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-25 14:19:57 -0600 |
commit | ea8c2d8f6014b74921dd5a9654a623a725d79608 (patch) | |
tree | af9fb6d695159fa3513a9707d51e73d025ca86dc /drivers/infiniband/core/cache.c | |
parent | a8872d53e9b7fcf650f0e4be40887b3ad5210e33 (diff) |
RDMA/core: Remove unused ib cache functions
Now that all users have been converted to use the version of these APIs
that returns a gid_attr pointer we can delete the old entry points.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r-- | drivers/infiniband/core/cache.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index dada33c53188..357a5cb328c7 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -643,30 +643,6 @@ int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port, return 0; } -static int __ib_cache_gid_get(struct ib_device *ib_dev, u8 port, int index, - union ib_gid *gid, struct ib_gid_attr *attr) -{ - struct ib_gid_table *table; - - table = rdma_gid_table(ib_dev, port); - - if (index < 0 || index >= table->sz) - return -EINVAL; - - if (!is_gid_entry_valid(table->data_vec[index])) - return -EINVAL; - - memcpy(gid, &table->data_vec[index]->attr.gid, sizeof(*gid)); - if (attr) { - memcpy(attr, &table->data_vec[index]->attr, - sizeof(*attr)); - if (attr->ndev) - dev_hold(attr->ndev); - } - - return 0; -} - /** * rdma_find_gid_by_port - Returns the GID entry attributes when it finds * a valid GID entry for given search parameters. It searches for the specified @@ -973,28 +949,6 @@ static int gid_table_setup_one(struct ib_device *ib_dev) return err; } -int ib_get_cached_gid(struct ib_device *device, - u8 port_num, - int index, - union ib_gid *gid, - struct ib_gid_attr *gid_attr) -{ - int res; - unsigned long flags; - struct ib_gid_table *table; - - if (!rdma_is_port_valid(device, port_num)) - return -EINVAL; - - table = rdma_gid_table(device, port_num); - read_lock_irqsave(&table->rwlock, flags); - res = __ib_cache_gid_get(device, port_num, index, gid, gid_attr); - read_unlock_irqrestore(&table->rwlock, flags); - - return res; -} -EXPORT_SYMBOL(ib_get_cached_gid); - /** * rdma_query_gid - Read the GID content from the GID software cache * @device: Device to query the GID @@ -1102,28 +1056,6 @@ int ib_find_cached_gid(struct ib_device *device, const union ib_gid *gid, } EXPORT_SYMBOL(ib_find_cached_gid); -int ib_find_gid_by_filter(struct ib_device *device, - const union ib_gid *gid, - u8 port_num, - bool (*filter)(const union ib_gid *gid, - const struct ib_gid_attr *, - void *), - void *context, u16 *index) -{ - const struct ib_gid_attr *res; - - res = rdma_find_gid_by_filter(device, gid, port_num, filter, - context); - if (IS_ERR(res)) - return PTR_ERR(res); - - if (index) - *index = res->index; - - rdma_put_gid_attr(res); - return 0; -} - int ib_get_cached_pkey(struct ib_device *device, u8 port_num, int index, |