diff options
author | Petr Machata <petrm@nvidia.com> | 2023-06-09 19:32:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-12 09:49:30 +0100 |
commit | 0255f74845c0035d918697b7abff1fcf45ed2789 (patch) | |
tree | 486ad1562639a257dc73c6949aef4a4c1beb2c20 /drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | |
parent | 151b89f6025a95dd8083d5844f2746a9450653ca (diff) |
mlxsw: Convert RIF-has-netdevice queries to a dedicated helper
In a number of places, a netdevice underlying a RIF is obtained only to
check if it a NULL pointer. In order to clean up the interface between the
router and the other modules, add a new helper to specifically answer this
question, and convert the relevant uses to this new interface.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c index 5416093c0e35..c8a356accdf8 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c @@ -221,7 +221,7 @@ start_again: for (; i < rif_count; i++) { struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); - if (!rif || !mlxsw_sp_rif_dev(rif)) + if (!rif || !mlxsw_sp_rif_has_dev(rif)) continue; err = mlxsw_sp_erif_entry_get(mlxsw_sp, &entry, rif, counters_enabled); |