RDMA/rxe: Save a few bytes from struct rxe_pool
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 24 Oct 2021 16:43:30 +0000 (18:43 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 28 Oct 2021 11:58:27 +0000 (08:58 -0300)
'table_size' is never read, it can be removed.

In fact, the only place that uses something that could be 'table_size' is
'alloc_index()'. In this function, it is re-computed from 'min_index' and
'max_index'.

Link: https://lore.kernel.org/r/2c42065049bb2b99bededdc423a9babf4a98adee.1635093628.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_pool.c
drivers/infiniband/sw/rxe/rxe_pool.h

index 7b4cb46edfd9d83448823cfce1eead0500cb926d..271d4ac0e0aa82c9654f523f9ae75a3af27f98d5 100644 (file)
@@ -114,7 +114,6 @@ static int rxe_pool_init_index(struct rxe_pool *pool, u32 max, u32 min)
                goto out;
        }
 
-       pool->index.table_size = size;
        bitmap_zero(pool->index.table, max - min + 1);
 
 out:
index 1feca1bffcedfcb5b7f63042daf2c2e856996d65..1ff2250edf6dc03396e05387670ced4d256313a7 100644 (file)
@@ -74,7 +74,6 @@ struct rxe_pool {
        struct {
                struct rb_root          tree;
                unsigned long           *table;
-               size_t                  table_size;
                u32                     last;
                u32                     max_index;
                u32                     min_index;