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>
17 lines
517 B
C
17 lines
517 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2019, Intel Corporation. */
|
|
|
|
#ifndef _ICE_DEVLINK_H_
|
|
#define _ICE_DEVLINK_H_
|
|
|
|
struct ice_pf *ice_allocate_pf(struct device *dev);
|
|
|
|
void ice_devlink_register(struct ice_pf *pf);
|
|
void ice_devlink_unregister(struct ice_pf *pf);
|
|
int ice_devlink_create_port(struct ice_vsi *vsi);
|
|
void ice_devlink_destroy_port(struct ice_vsi *vsi);
|
|
|
|
void ice_devlink_init_regions(struct ice_pf *pf);
|
|
void ice_devlink_destroy_regions(struct ice_pf *pf);
|
|
|
|
#endif /* _ICE_DEVLINK_H_ */
|