RDMA/siw: Correct wrong debug message
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Mon, 21 Aug 2023 13:32:54 +0000 (21:32 +0800)
committerLeon Romanovsky <leon@kernel.org>
Tue, 22 Aug 2023 14:05:12 +0000 (17:05 +0300)
We need to print num_sle first then pbl->max_buf per the condition.
Also replace mem->pbl with pbl while at it.

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20230821133255.31111-3-guoqing.jiang@linux.dev
Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/siw/siw_verbs.c

index fadfa70853f333f455e5b66483a61c4863f1a031..fdbef3254e308674966e33463c700a259c28e264 100644 (file)
@@ -1494,7 +1494,7 @@ int siw_map_mr_sg(struct ib_mr *base_mr, struct scatterlist *sl, int num_sle,
 
        if (pbl->max_buf < num_sle) {
                siw_dbg_mem(mem, "too many SGE's: %d > %d\n",
-                           mem->pbl->max_buf, num_sle);
+                           num_sle, pbl->max_buf);
                return -ENOMEM;
        }
        for_each_sg(sl, slp, num_sle, i) {