RDMA/rxe: Make add/drop key/index APIs type safe
authorBob Pearson <rpearsonhpe@gmail.com>
Wed, 16 Dec 2020 23:15:48 +0000 (17:15 -0600)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 12 Jan 2021 20:35:38 +0000 (16:35 -0400)
commit91a42c5becb685e1ae73554726906dfe74a8afdd
tree7051867246e3603943a6b0d61dad46513c481e60
parent2622aa718a6a774ba302ca002adc62eeab9cdf28
RDMA/rxe: Make add/drop key/index APIs type safe

Replace 'void *' parameters with 'struct rxe_pool_entry *' and use a macro
to allow:
   rxe_add_index,
   rxe_drop_index,
   rxe_add_key,
   rxe_drop_key and
   rxe_add_to_pool
APIs to be type safe against changing the position of pelem in the
objects.

Link: https://lore.kernel.org/r/20201216231550.27224-6-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_pool.c
drivers/infiniband/sw/rxe/rxe_pool.h
drivers/infiniband/sw/rxe/rxe_verbs.c