devlink: Make devlink_register to be void
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 22 Sep 2021 08:58:03 +0000 (11:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Sep 2021 13:15:12 +0000 (14:15 +0100)
commitdb4278c55fa53760893266538e86e638330b03bb
treec2b028bf752e268e9a85791aa199db4f559b80be
parent07b855628c226511542d0911cba1b180541fbb84
devlink: Make devlink_register to be void

devlink_register() can't fail and always returns success, but all drivers
are obligated to check returned status anyway. This adds a lot of boilerplate
code to handle impossible flow.

Make devlink_register() void and simplify the drivers that use that
API call.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Vladimir Oltean <olteanv@gmail.com> # dsa
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
30 files changed:
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
drivers/net/ethernet/huawei/hinic/hinic_devlink.c
drivers/net/ethernet/huawei/hinic/hinic_devlink.h
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
drivers/net/ethernet/intel/ice/ice_devlink.c
drivers/net/ethernet/intel/ice/ice_devlink.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
drivers/net/ethernet/marvell/prestera/prestera_devlink.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mscc/ocelot_vsc7514.c
drivers/net/ethernet/netronome/nfp/nfp_net_main.c
drivers/net/ethernet/pensando/ionic/ionic_devlink.c
drivers/net/ethernet/qlogic/qed/qed_devlink.c
drivers/net/ethernet/ti/am65-cpsw-nuss.c
drivers/net/ethernet/ti/cpsw_new.c
drivers/net/netdevsim/dev.c
drivers/net/wwan/iosm/iosm_ipc_devlink.c
drivers/ptp/ptp_ocp.c
drivers/staging/qlge/qlge_main.c
include/net/devlink.h
net/core/devlink.c
net/dsa/dsa2.c