diff mbox series

[for-next,1/2] RDMA/rxe: use %u to print u32 variables

Message ID 1662518901-2-1-git-send-email-lizhijian@fujitsu.com (mailing list archive)
State Accepted
Headers show
Series [for-next,1/2] RDMA/rxe: use %u to print u32 variables | expand

Commit Message

Li Zhijian Sept. 7, 2022, 2:48 a.m. UTC
struct ib_qp_cap {
        u32     max_send_wr;
        u32     max_recv_wr;
        u32     max_send_sge;
        u32     max_recv_sge;
        u32     max_inline_data;
...

To avoid getting a negative value from dmesg:
[410580.579965] rdma_rxe: invalid send sge = 65535 > 32
[410580.583818] rdma_rxe: invalid send wr = -1 > 1048576
[410582.771323] rdma_rxe: invalid recv sge = 65535 > 32
[410582.775310] rdma_rxe: invalid recv wr = -1 > 1048576

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 drivers/infiniband/sw/rxe/rxe_qp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Leon Romanovsky Sept. 8, 2022, 8:04 a.m. UTC | #1
On Wed, Sep 07, 2022 at 02:48:20AM +0000, Li Zhijian wrote:
> struct ib_qp_cap {
>         u32     max_send_wr;
>         u32     max_recv_wr;
>         u32     max_send_sge;
>         u32     max_recv_sge;
>         u32     max_inline_data;
> ...
> 
> To avoid getting a negative value from dmesg:
> [410580.579965] rdma_rxe: invalid send sge = 65535 > 32
> [410580.583818] rdma_rxe: invalid send wr = -1 > 1048576
> [410582.771323] rdma_rxe: invalid recv sge = 65535 > 32
> [410582.775310] rdma_rxe: invalid recv wr = -1 > 1048576
> 
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_qp.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Thanks, applied.
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 1dcbeacb3122..ad7f06f4beb0 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -19,33 +19,33 @@  static int rxe_qp_chk_cap(struct rxe_dev *rxe, struct ib_qp_cap *cap,
 			  int has_srq)
 {
 	if (cap->max_send_wr > rxe->attr.max_qp_wr) {
-		pr_warn("invalid send wr = %d > %d\n",
+		pr_warn("invalid send wr = %u > %d\n",
 			cap->max_send_wr, rxe->attr.max_qp_wr);
 		goto err1;
 	}
 
 	if (cap->max_send_sge > rxe->attr.max_send_sge) {
-		pr_warn("invalid send sge = %d > %d\n",
+		pr_warn("invalid send sge = %u > %d\n",
 			cap->max_send_sge, rxe->attr.max_send_sge);
 		goto err1;
 	}
 
 	if (!has_srq) {
 		if (cap->max_recv_wr > rxe->attr.max_qp_wr) {
-			pr_warn("invalid recv wr = %d > %d\n",
+			pr_warn("invalid recv wr = %u > %d\n",
 				cap->max_recv_wr, rxe->attr.max_qp_wr);
 			goto err1;
 		}
 
 		if (cap->max_recv_sge > rxe->attr.max_recv_sge) {
-			pr_warn("invalid recv sge = %d > %d\n",
+			pr_warn("invalid recv sge = %u > %d\n",
 				cap->max_recv_sge, rxe->attr.max_recv_sge);
 			goto err1;
 		}
 	}
 
 	if (cap->max_inline_data > rxe->max_inline_data) {
-		pr_warn("invalid max inline data = %d > %d\n",
+		pr_warn("invalid max inline data = %u > %d\n",
 			cap->max_inline_data, rxe->max_inline_data);
 		goto err1;
 	}