linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: Fix printk format warning
@ 2019-12-20  0:15 Olof Johansson
  2019-12-20  2:06 ` Joe Perches
  0 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2019-12-20  0:15 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, Olof Johansson

Use "%zu" for size_t. Seen on ARM allmodconfig:

drivers/net/ethernet/mellanox/mlx5/core/wq.c: In function 'mlx5_wq_cyc_wqe_dump':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]

Fixes: 130c7b46c93d ("net/mlx5e: TX, Dump WQs wqe descriptors on CQE with error events")
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/net/ethernet/mellanox/mlx5/core/wq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
index f2a0e72285bac..02f7e4a39578a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
@@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
 	len = nstrides << wq->fbc.log_stride;
 	wqe = mlx5_wq_cyc_get_wqe(wq, ix);
 
-	pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %ld\n",
+	pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %zu\n",
 		mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
 	print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, wqe, len, false);
 }
-- 
2.11.0


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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2019-12-20  0:15 [PATCH] net/mlx5e: Fix printk format warning Olof Johansson
@ 2019-12-20  2:06 ` Joe Perches
  2019-12-21 21:19   ` Olof Johansson
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2019-12-20  2:06 UTC (permalink / raw)
  To: Olof Johansson, Saeed Mahameed, Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel

On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> Use "%zu" for size_t. Seen on ARM allmodconfig:
[]
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
[]
> @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
>  	len = nstrides << wq->fbc.log_stride;
>  	wqe = mlx5_wq_cyc_get_wqe(wq, ix);
>  
> -	pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %ld\n",
> +	pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %zu\n",
>  		mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
>  	print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, wqe, len, false);
>  }

One might expect these 2 outputs to be at the same KERN_<LEVEL> too.
One is KERN_INFO the other KERN_WARNING



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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2019-12-20  2:06 ` Joe Perches
@ 2019-12-21 21:19   ` Olof Johansson
  2019-12-31  4:35     ` Saeed Mahameed
  0 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2019-12-21 21:19 UTC (permalink / raw)
  To: Joe Perches
  Cc: Saeed Mahameed, Leon Romanovsky, Network Development, linux-rdma,
	Linux Kernel Mailing List

On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com> wrote:
>
> On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > Use "%zu" for size_t. Seen on ARM allmodconfig:
> []
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> []
> > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> >       len = nstrides << wq->fbc.log_stride;
> >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> >
> > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %ld\n",
> > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %zu\n",
> >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
> >       print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, wqe, len, false);
> >  }
>
> One might expect these 2 outputs to be at the same KERN_<LEVEL> too.
> One is KERN_INFO the other KERN_WARNING

Sure, but I'll leave that up to the driver maintainers to decide/fix
-- I'm just addressing the type warning here.


-Olof

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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2019-12-21 21:19   ` Olof Johansson
@ 2019-12-31  4:35     ` Saeed Mahameed
  2020-01-21  3:20       ` Olof Johansson
  0 siblings, 1 reply; 8+ messages in thread
From: Saeed Mahameed @ 2019-12-31  4:35 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Joe Perches, Saeed Mahameed, Leon Romanovsky,
	Network Development, RDMA mailing list,
	Linux Kernel Mailing List

On Sat, Dec 21, 2019 at 1:19 PM Olof Johansson <olof@lixom.net> wrote:
>
> On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com> wrote:
> >
> > On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > > Use "%zu" for size_t. Seen on ARM allmodconfig:
> > []
> > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > []
> > > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> > >       len = nstrides << wq->fbc.log_stride;
> > >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> > >
> > > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %ld\n",
> > > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %zu\n",
> > >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
> > >       print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, wqe, len, false);
> > >  }
> >
> > One might expect these 2 outputs to be at the same KERN_<LEVEL> too.
> > One is KERN_INFO the other KERN_WARNING
>
> Sure, but I'll leave that up to the driver maintainers to decide/fix
> -- I'm just addressing the type warning here.

Hi Olof, sorry for the delay, and thanks for the patch,

I will apply this to net-next-mlx5 and will submit to net-next myself.
we will fixup and address the warning level comment by Joe.

>
>
> -Olof

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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2019-12-31  4:35     ` Saeed Mahameed
@ 2020-01-21  3:20       ` Olof Johansson
  2020-01-21 20:43         ` Saeed Mahameed
  0 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2020-01-21  3:20 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: Joe Perches, Saeed Mahameed, Leon Romanovsky,
	Network Development, RDMA mailing list,
	Linux Kernel Mailing List

Hi,

On Mon, Dec 30, 2019 at 8:35 PM Saeed Mahameed
<saeedm@dev.mellanox.co.il> wrote:
>
> On Sat, Dec 21, 2019 at 1:19 PM Olof Johansson <olof@lixom.net> wrote:
> >
> > On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com> wrote:
> > >
> > > On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > > > Use "%zu" for size_t. Seen on ARM allmodconfig:
> > > []
> > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > []
> > > > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> > > >       len = nstrides << wq->fbc.log_stride;
> > > >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> > > >
> > > > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %ld\n",
> > > > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index 0x%x, len: %zu\n",
> > > >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
> > > >       print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, wqe, len, false);
> > > >  }
> > >
> > > One might expect these 2 outputs to be at the same KERN_<LEVEL> too.
> > > One is KERN_INFO the other KERN_WARNING
> >
> > Sure, but I'll leave that up to the driver maintainers to decide/fix
> > -- I'm just addressing the type warning here.
>
> Hi Olof, sorry for the delay, and thanks for the patch,
>
> I will apply this to net-next-mlx5 and will submit to net-next myself.
> we will fixup and address the warning level comment by Joe.

This seems to still be pending, and the merge window is soon here. Any
chance we can see it show up in linux-next soon?


Thanks,

-Olof

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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2020-01-21  3:20       ` Olof Johansson
@ 2020-01-21 20:43         ` Saeed Mahameed
  2020-01-22 16:36           ` Olof Johansson
  0 siblings, 1 reply; 8+ messages in thread
From: Saeed Mahameed @ 2020-01-21 20:43 UTC (permalink / raw)
  To: saeedm, olof; +Cc: joe, netdev, linux-rdma, leon, linux-kernel

On Mon, 2020-01-20 at 19:20 -0800, Olof Johansson wrote:
> Hi,
> 
> On Mon, Dec 30, 2019 at 8:35 PM Saeed Mahameed
> <saeedm@dev.mellanox.co.il> wrote:
> > On Sat, Dec 21, 2019 at 1:19 PM Olof Johansson <olof@lixom.net>
> > wrote:
> > > On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com>
> > > wrote:
> > > > On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > > > > Use "%zu" for size_t. Seen on ARM allmodconfig:
> > > > []
> > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > > b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > []
> > > > > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct
> > > > > mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> > > > >       len = nstrides << wq->fbc.log_stride;
> > > > >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> > > > > 
> > > > > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index
> > > > > 0x%x, len: %ld\n",
> > > > > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index
> > > > > 0x%x, len: %zu\n",
> > > > >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
> > > > >       print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET,
> > > > > 16, 1, wqe, len, false);
> > > > >  }
> > > > 
> > > > One might expect these 2 outputs to be at the same KERN_<LEVEL>
> > > > too.
> > > > One is KERN_INFO the other KERN_WARNING
> > > 
> > > Sure, but I'll leave that up to the driver maintainers to
> > > decide/fix
> > > -- I'm just addressing the type warning here.
> > 
> > Hi Olof, sorry for the delay, and thanks for the patch,
> > 
> > I will apply this to net-next-mlx5 and will submit to net-next
> > myself.
> > we will fixup and address the warning level comment by Joe.
> 
> This seems to still be pending, and the merge window is soon here.
> Any
> chance we can see it show up in linux-next soon?
> 
> 

Hi Olof,

I am still preparing my next pull request which will include this patch
I will send it soon to net-next branch, but still the patch will not
hit linux-next until the merge window when netdev subsystem is pulled
into linux-next..

Thanks,
Saeed.


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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2020-01-21 20:43         ` Saeed Mahameed
@ 2020-01-22 16:36           ` Olof Johansson
  2020-01-22 18:51             ` Saeed Mahameed
  0 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2020-01-22 16:36 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: saeedm, joe, netdev, linux-rdma, leon, linux-kernel

On Tue, Jan 21, 2020 at 12:43 PM Saeed Mahameed <saeedm@mellanox.com> wrote:
>
> On Mon, 2020-01-20 at 19:20 -0800, Olof Johansson wrote:
> > Hi,
> >
> > On Mon, Dec 30, 2019 at 8:35 PM Saeed Mahameed
> > <saeedm@dev.mellanox.co.il> wrote:
> > > On Sat, Dec 21, 2019 at 1:19 PM Olof Johansson <olof@lixom.net>
> > > wrote:
> > > > On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com>
> > > > wrote:
> > > > > On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > > > > > Use "%zu" for size_t. Seen on ARM allmodconfig:
> > > > > []
> > > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > > > b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > > []
> > > > > > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct
> > > > > > mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> > > > > >       len = nstrides << wq->fbc.log_stride;
> > > > > >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> > > > > >
> > > > > > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index
> > > > > > 0x%x, len: %ld\n",
> > > > > > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE index
> > > > > > 0x%x, len: %zu\n",
> > > > > >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix, len);
> > > > > >       print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET,
> > > > > > 16, 1, wqe, len, false);
> > > > > >  }
> > > > >
> > > > > One might expect these 2 outputs to be at the same KERN_<LEVEL>
> > > > > too.
> > > > > One is KERN_INFO the other KERN_WARNING
> > > >
> > > > Sure, but I'll leave that up to the driver maintainers to
> > > > decide/fix
> > > > -- I'm just addressing the type warning here.
> > >
> > > Hi Olof, sorry for the delay, and thanks for the patch,
> > >
> > > I will apply this to net-next-mlx5 and will submit to net-next
> > > myself.
> > > we will fixup and address the warning level comment by Joe.
> >
> > This seems to still be pending, and the merge window is soon here.
> > Any
> > chance we can see it show up in linux-next soon?
> >
> >
>
> Hi Olof,
>
> I am still preparing my next pull request which will include this patch
> I will send it soon to net-next branch, but still the patch will not
> hit linux-next until the merge window when netdev subsystem is pulled
> into linux-next..

Hi Saeed,

linux-next contains all the material that maintainers are queuing up
for the next merge window, during the -rc cycles of the previous
release, including the net-next branch.

In general, the guideline is to make sure that most patches are in
-next around -rc6/rc7 timeframe, to give them some time for test
before merge window opens.

So the fact that this hasn't been picked up and showed up there yet,
seems concerning -- but I don't know when Dave closes net for new
material like what you're staging.


-Olof

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

* Re: [PATCH] net/mlx5e: Fix printk format warning
  2020-01-22 16:36           ` Olof Johansson
@ 2020-01-22 18:51             ` Saeed Mahameed
  0 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2020-01-22 18:51 UTC (permalink / raw)
  To: olof; +Cc: joe, saeedm, netdev, linux-rdma, leon, linux-kernel

On Wed, 2020-01-22 at 08:36 -0800, Olof Johansson wrote:
> On Tue, Jan 21, 2020 at 12:43 PM Saeed Mahameed <saeedm@mellanox.com>
> wrote:
> > On Mon, 2020-01-20 at 19:20 -0800, Olof Johansson wrote:
> > > Hi,
> > > 
> > > On Mon, Dec 30, 2019 at 8:35 PM Saeed Mahameed
> > > <saeedm@dev.mellanox.co.il> wrote:
> > > > On Sat, Dec 21, 2019 at 1:19 PM Olof Johansson <olof@lixom.net>
> > > > wrote:
> > > > > On Thu, Dec 19, 2019 at 6:07 PM Joe Perches <joe@perches.com>
> > > > > wrote:
> > > > > > On Thu, 2019-12-19 at 16:15 -0800, Olof Johansson wrote:
> > > > > > > Use "%zu" for size_t. Seen on ARM allmodconfig:
> > > > > > []
> > > > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > > > > b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
> > > > > > []
> > > > > > > @@ -89,7 +89,7 @@ void mlx5_wq_cyc_wqe_dump(struct
> > > > > > > mlx5_wq_cyc *wq, u16 ix, u8 nstrides)
> > > > > > >       len = nstrides << wq->fbc.log_stride;
> > > > > > >       wqe = mlx5_wq_cyc_get_wqe(wq, ix);
> > > > > > > 
> > > > > > > -     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE
> > > > > > > index
> > > > > > > 0x%x, len: %ld\n",
> > > > > > > +     pr_info("WQE DUMP: WQ size %d WQ cur size %d, WQE
> > > > > > > index
> > > > > > > 0x%x, len: %zu\n",
> > > > > > >               mlx5_wq_cyc_get_size(wq), wq->cur_sz, ix,
> > > > > > > len);
> > > > > > >       print_hex_dump(KERN_WARNING, "",
> > > > > > > DUMP_PREFIX_OFFSET,
> > > > > > > 16, 1, wqe, len, false);
> > > > > > >  }
> > > > > > 
> > > > > > One might expect these 2 outputs to be at the same
> > > > > > KERN_<LEVEL>
> > > > > > too.
> > > > > > One is KERN_INFO the other KERN_WARNING
> > > > > 
> > > > > Sure, but I'll leave that up to the driver maintainers to
> > > > > decide/fix
> > > > > -- I'm just addressing the type warning here.
> > > > 
> > > > Hi Olof, sorry for the delay, and thanks for the patch,
> > > > 
> > > > I will apply this to net-next-mlx5 and will submit to net-next
> > > > myself.
> > > > we will fixup and address the warning level comment by Joe.
> > > 
> > > This seems to still be pending, and the merge window is soon
> > > here.
> > > Any
> > > chance we can see it show up in linux-next soon?
> > > 
> > > 
> > 
> > Hi Olof,
> > 
> > I am still preparing my next pull request which will include this
> > patch
> > I will send it soon to net-next branch, but still the patch will
> > not
> > hit linux-next until the merge window when netdev subsystem is
> > pulled
> > into linux-next..
> 
> Hi Saeed,
> 
> linux-next contains all the material that maintainers are queuing up
> for the next merge window, during the -rc cycles of the previous
> release, including the net-next branch.
> 

I know, this is the reason why your patch is not in linux-next yet,
since i didn't send my pull request to net-next yet, i am planing to do
it today :), sorry for the delays.

> In general, the guideline is to make sure that most patches are in
> -next around -rc6/rc7 timeframe, to give them some time for test
> before merge window opens.
> 
> So the fact that this hasn't been picked up and showed up there yet,
> seems concerning -- but I don't know when Dave closes net for new
> material like what you're staging.
> 

Maybe it is a good idea to mark my branch to be merged into linux-next.
I will take care of this, thanks for pointing out.. 

> 
> -Olof

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

end of thread, other threads:[~2020-01-22 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20  0:15 [PATCH] net/mlx5e: Fix printk format warning Olof Johansson
2019-12-20  2:06 ` Joe Perches
2019-12-21 21:19   ` Olof Johansson
2019-12-31  4:35     ` Saeed Mahameed
2020-01-21  3:20       ` Olof Johansson
2020-01-21 20:43         ` Saeed Mahameed
2020-01-22 16:36           ` Olof Johansson
2020-01-22 18:51             ` Saeed Mahameed

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).