diff mbox series

[V2,2/3] RDMA/siw: Correct wrong debug message

Message ID 20230821084743.6489-3-guoqing.jiang@linux.dev (mailing list archive)
State Superseded
Headers show
Series Misc changes for siw | expand

Commit Message

Guoqing Jiang Aug. 21, 2023, 8:47 a.m. UTC
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>
---
 drivers/infiniband/sw/siw/siw_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bernard Metzler Aug. 21, 2023, 11:57 a.m. UTC | #1
> -----Original Message-----
> From: Guoqing Jiang <guoqing.jiang@linux.dev>
> Sent: Monday, 21 August 2023 10:48
> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org
> Cc: linux-rdma@vger.kernel.org
> Subject: [EXTERNAL] [PATCH V2 2/3] RDMA/siw: Correct wrong debug message
> 
> 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>
> ---
>  drivers/infiniband/sw/siw/siw_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
> b/drivers/infiniband/sw/siw/siw_verbs.c
> index 398ec13db624..4832723dc244 100644
> --- a/drivers/infiniband/sw/siw/siw_verbs.c
> +++ b/drivers/infiniband/sw/siw/siw_verbs.c
> @@ -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) {
> --
> 2.35.3
makes sense, thank you!

Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 398ec13db624..4832723dc244 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -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) {