linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] RDMA/rxe: Save a few bytes from struct rxe_pool
@ 2021-10-24 16:43 Christophe JAILLET
  2021-10-24 16:43 ` [PATCH 2/2] RDMA/rxe: Use 'bitmap_zalloc()' when applicable Christophe JAILLET
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-10-24 16:43 UTC (permalink / raw)
  To: zyjzyj2000, dledford, jgg
  Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET

'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'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/infiniband/sw/rxe/rxe_pool.c | 1 -
 drivers/infiniband/sw/rxe/rxe_pool.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
index 7b4cb46edfd9..271d4ac0e0aa 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -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:
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.h b/drivers/infiniband/sw/rxe/rxe_pool.h
index 1feca1bffced..1ff2250edf6d 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.h
+++ b/drivers/infiniband/sw/rxe/rxe_pool.h
@@ -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;
-- 
2.30.2


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

end of thread, other threads:[~2021-10-27 16:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 16:43 [PATCH 1/2] RDMA/rxe: Save a few bytes from struct rxe_pool Christophe JAILLET
2021-10-24 16:43 ` [PATCH 2/2] RDMA/rxe: Use 'bitmap_zalloc()' when applicable Christophe JAILLET
2021-10-24 17:30   ` Christophe JAILLET
2021-10-24 17:13 ` [PATCH] RDMA/rxe: Make rxe_type_info static const Joe Perches
2021-10-27 16:55   ` Jason Gunthorpe
2021-10-27 16:55 ` [PATCH 1/2] RDMA/rxe: Save a few bytes from struct rxe_pool Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).