linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data()
@ 2020-06-05  2:30 Tom Seewald
  2020-06-07  6:38 ` Leon Romanovsky
  2020-06-15 18:53 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Seewald @ 2020-06-05  2:30 UTC (permalink / raw)
  To: linux-rdma; +Cc: tseewald, Leon Romanovsky, Doug Ledford, Jason Gunthorpe

Variables of type size_t should use %zu rather than %lu [1]. The variables
"inlen", "ucmd", "last", and "size" are all size_t, so use the correct
format specifiers.

[1] https://www.kernel.org/doc/html/latest/core-api/printk-formats.html

Signed-off-by: Tom Seewald <tseewald@gmail.com>
---
 drivers/infiniband/hw/mlx5/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 81bf6b975e0e..e51b39632605 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2907,7 +2907,7 @@ static int check_ucmd_data(struct mlx5_ib_dev *dev,
 	if (!ret)
 		mlx5_ib_dbg(
 			dev,
-			"udata is not cleared, inlen = %lu, ucmd = %lu, last = %lu, size = %lu\n",
+			"udata is not cleared, inlen = %zu, ucmd = %zu, last = %zu, size = %zu\n",
 			udata->inlen, params->ucmd_size, last, size);
 	return ret ? 0 : -EINVAL;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data()
  2020-06-05  2:30 [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data() Tom Seewald
@ 2020-06-07  6:38 ` Leon Romanovsky
  2020-06-15 18:53 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2020-06-07  6:38 UTC (permalink / raw)
  To: Tom Seewald; +Cc: linux-rdma, Doug Ledford, Jason Gunthorpe

On Thu, Jun 04, 2020 at 09:30:12PM -0500, Tom Seewald wrote:
> Variables of type size_t should use %zu rather than %lu [1]. The variables
> "inlen", "ucmd", "last", and "size" are all size_t, so use the correct
> format specifiers.
>
> [1] https://www.kernel.org/doc/html/latest/core-api/printk-formats.html
>
> Signed-off-by: Tom Seewald <tseewald@gmail.com>
> ---
>  drivers/infiniband/hw/mlx5/qp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data()
  2020-06-05  2:30 [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data() Tom Seewald
  2020-06-07  6:38 ` Leon Romanovsky
@ 2020-06-15 18:53 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-06-15 18:53 UTC (permalink / raw)
  To: Tom Seewald; +Cc: linux-rdma, Leon Romanovsky, Doug Ledford

On Thu, Jun 04, 2020 at 09:30:12PM -0500, Tom Seewald wrote:
> Variables of type size_t should use %zu rather than %lu [1]. The variables
> "inlen", "ucmd", "last", and "size" are all size_t, so use the correct
> format specifiers.
> 
> [1] https://www.kernel.org/doc/html/latest/core-api/printk-formats.html
> 
> Signed-off-by: Tom Seewald <tseewald@gmail.com>
> Acked-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/qp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc with a Fixes line

Thanks,
Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-15 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05  2:30 [PATCH] [next] RDMA/mlx5: Fix -Wformat warning in check_ucmd_data() Tom Seewald
2020-06-07  6:38 ` Leon Romanovsky
2020-06-15 18:53 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).