]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Cleanup WQE page fault handler
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 25 Feb 2019 06:56:14 +0000 (08:56 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 4 Apr 2019 11:28:59 +0000 (08:28 -0300)
commit0c6b283165142c1d58ca97bad6dd001713169e75
tree6aa4943e6b8b6d642e2ec80d16b2df4c52466c69
parentc9d7895cdb78c68e954c1f8a2150d577e4ec700c
RDMA/mlx5: Cleanup WQE page fault handler

Refactor the page fault handler to be more readable and extensible, this
cleanup was triggered by the error reported below. The code structure made
it unclear to the automatic tools to identify that such a flow is not
possible in real life because "requestor != NULL" means that "qp != NULL"
too.

    drivers/infiniband/hw/mlx5/odp.c:1254 mlx5_ib_mr_wqe_pfault_handler()
    error: we previously assumed 'qp' could be null (see line 1230)

Fixes: 00c093681cb4 ("IB/mlx5: Add ODP SRQ support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/odp.c