mbox series

[net-next,v2,00/11] devlink: retain error in struct devlink_fmsg

Message ID 20231017105341.415466-1-przemyslaw.kitszel@intel.com (mailing list archive)
Headers show
Series devlink: retain error in struct devlink_fmsg | expand

Message

Przemek Kitszel Oct. 17, 2023, 10:53 a.m. UTC
Extend devlink fmsg to retain error (patch 1),
so drivers could omit error checks after devlink_fmsg_*() (patches 2-10),
and finally enforce future uses to follow this practice by change to
return void (patch 11)

Note that it was compile tested only.

bloat-o-meter for whole series:
add/remove: 8/18 grow/shrink: 23/40 up/down: 2017/-5833 (-3816)

changelog:
v2: extend series by two more drivers (qed, qlge);
    add final cleanup patch, since now whole series should be merged in
    one part (thanks Jiri for encouragement here);

v1:
https://lore.kernel.org/netdev/20231010104318.3571791-3-przemyslaw.kitszel@intel.com

Przemek Kitszel (11):
  devlink: retain error in struct devlink_fmsg
  netdevsim: devlink health: use retained error fmsg API
  pds_core: devlink health: use retained error fmsg API
  bnxt_en: devlink health: use retained error fmsg API
  hinic: devlink health: use retained error fmsg API
  octeontx2-af: devlink health: use retained error fmsg API
  mlxsw: core: devlink health: use retained error fmsg API
  net/mlx5: devlink health: use retained error fmsg API
  qed: devlink health: use retained error fmsg API
  staging: qlge: devlink health: use retained error fmsg API
  devlink: convert most of devlink_fmsg_*() to return void

 drivers/net/ethernet/amd/pds_core/devlink.c   |  29 +-
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |  93 ++--
 .../net/ethernet/huawei/hinic/hinic_devlink.c | 217 +++-----
 .../marvell/octeontx2/af/rvu_devlink.c        | 464 +++++-------------
 .../mellanox/mlx5/core/diag/fw_tracer.c       |  49 +-
 .../mellanox/mlx5/core/diag/reporter_vnic.c   | 118 ++---
 .../mellanox/mlx5/core/diag/reporter_vnic.h   |   6 +-
 .../ethernet/mellanox/mlx5/core/en/health.c   | 185 ++-----
 .../ethernet/mellanox/mlx5/core/en/health.h   |  14 +-
 .../mellanox/mlx5/core/en/reporter_rx.c       | 426 ++++------------
 .../mellanox/mlx5/core/en/reporter_tx.c       | 346 ++++---------
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |   5 +-
 .../net/ethernet/mellanox/mlx5/core/health.c  | 127 ++---
 drivers/net/ethernet/mellanox/mlxsw/core.c    | 171 ++-----
 drivers/net/ethernet/qlogic/qed/qed_devlink.c |   6 +-
 drivers/net/netdevsim/health.c                | 118 ++---
 drivers/staging/qlge/qlge_devlink.c           |  60 +--
 include/net/devlink.h                         |  60 +--
 net/devlink/health.c                          | 388 +++++----------
 19 files changed, 822 insertions(+), 2060 deletions(-)

Comments

Jiri Pirko Oct. 17, 2023, 11:17 a.m. UTC | #1
Tue, Oct 17, 2023 at 12:53:30PM CEST, przemyslaw.kitszel@intel.com wrote:
>Extend devlink fmsg to retain error (patch 1),
>so drivers could omit error checks after devlink_fmsg_*() (patches 2-10),
>and finally enforce future uses to follow this practice by change to
>return void (patch 11)
>
>Note that it was compile tested only.
>
>bloat-o-meter for whole series:
>add/remove: 8/18 grow/shrink: 23/40 up/down: 2017/-5833 (-3816)
>
>changelog:
>v2: extend series by two more drivers (qed, qlge);
>    add final cleanup patch, since now whole series should be merged in
>    one part (thanks Jiri for encouragement here);
>
>v1:
>https://lore.kernel.org/netdev/20231010104318.3571791-3-przemyslaw.kitszel@intel.com
>
>Przemek Kitszel (11):
>  devlink: retain error in struct devlink_fmsg
>  netdevsim: devlink health: use retained error fmsg API
>  pds_core: devlink health: use retained error fmsg API
>  bnxt_en: devlink health: use retained error fmsg API
>  hinic: devlink health: use retained error fmsg API
>  octeontx2-af: devlink health: use retained error fmsg API
>  mlxsw: core: devlink health: use retained error fmsg API
>  net/mlx5: devlink health: use retained error fmsg API
>  qed: devlink health: use retained error fmsg API
>  staging: qlge: devlink health: use retained error fmsg API
>  devlink: convert most of devlink_fmsg_*() to return void

Looks great.

Thanks!

set-
Reviewed-by: Jiri Pirko <jiri@nvidia.com>