On Wed, Sep 15, 2021 at 01:25:19PM -0300, Jason Gunthorpe wrote: > Two list heads in the rdma_id_private are being used for multiple > purposes, to save a few bytes of memory. Give the different purposes > different names and union the memory that is clearly exclusive. > > list splits into device_item and listen_any_item. device_item is threaded > onto the cma_device's list and listen_any goes onto the > listen_any_list. IDs doing any listen cannot have devices. > > listen_list splits into listen_item and listen_list. listen_list is on the > parent listen any rdma_id_private and listen_item is on child listen that > is bound to a specific cma_dev. > > Which name should be used in which case depends on the state and other > factors of the rdma_id_private. Remap all the confusing references to make > sense with the new names, so at least there is some hope of matching the > necessary preconditions with each access. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/infiniband/core/cma.c | 34 ++++++++++++++++-------------- > drivers/infiniband/core/cma_priv.h | 11 ++++++++-- > 2 files changed, 27 insertions(+), 18 deletions(-) Applied to for-next Jason