net/mlx5e: Fix printk format warning
authorOlof Johansson <olof@lixom.net>
Fri, 20 Dec 2019 00:15:17 +0000 (16:15 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 23 Jan 2020 06:28:20 +0000 (22:28 -0800)
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>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/wq.c

index f2a0e72285bac003c2739f912092d8406542944a..02f7e4a39578a33f04e030c32e1da47a322d09aa 100644 (file)
@@ -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);
 }