On Wed, 22 Oct 2025 12:37:36 -0700 Daniel Zahka wrote:
mlx5_core_warn(mdev,
"fail to create psp rx flow counter err(%ld)\n",PTR_ERR(flow_counter));err = PTR_ERR(flow_counter);goto out_err;- }
- accel_psp->rx_counter = flow_counter;
- flow_counter = mlx5_fc_create(mdev, false);
- if (IS_ERR(flow_counter)) {
mlx5_core_warn(mdev,"fail to create psp rx auth fail flow counter err(%ld)\n",PTR_ERR(flow_counter));err = PTR_ERR(flow_counter);goto out_counter_err;- }
- accel_psp->rx_auth_fail_counter = flow_counter;
- flow_counter = mlx5_fc_create(mdev, false);
- if (IS_ERR(flow_counter)) {
mlx5_core_warn(mdev,"fail to create psp rx error flow counter err(%ld)\n",PTR_ERR(flow_counter));err = PTR_ERR(flow_counter);goto out_auth_fail_counter_err;- }
- accel_psp->rx_err_counter = flow_counter;
- flow_counter = mlx5_fc_create(mdev, false);
- if (IS_ERR(flow_counter)) {
mlx5_core_warn(mdev,"fail to create psp rx auth fail flow counter err(%ld)\n",PTR_ERR(flow_counter));
Coccicheck sayeth (5x):
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c: WARNING: Consider using %pe to print PTR_ERR()
That's %pe, flow_counter instead of %d, PTR_ERR(flow_counter)