]> asedeno.scripts.mit.edu Git - linux.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)
commit0f51427bd0976fc4824ca16e73b7985f224cbbf8
tree6aa4943e6b8b6d642e2ec80d16b2df4c52466c69
parent1c726c44210f8d2185cf61adfea850d1b87e75ab
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: 08100fad5cac ("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