diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2017-09-25 10:32:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-26 20:04:35 -0700 |
commit | ec2437f42b44edc84054feb943d49e8030154c38 (patch) | |
tree | abab603b50e49f649d9cb4d3a72021385d2cf8ec /drivers/net | |
parent | dbe4598c1e929a24dc352a7dc523a3cc22a093f2 (diff) | |
download | linux-ec2437f42b44edc84054feb943d49e8030154c38.tar.bz2 |
mlxsw: spectrum_router: Use helper to check for last neighbor
Use list_is_last helper to check for last neighbor.
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 0cd4b2a7d9d0..65e59a989084 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -1317,7 +1317,7 @@ mlxsw_sp_rif_neigh_next(struct mlxsw_sp_rif *rif, typeof(*neigh_entry), rif_list_node); } - if (neigh_entry->rif_list_node.next == &rif->neigh_list) + if (list_is_last(&neigh_entry->rif_list_node, &rif->neigh_list)) return NULL; return list_next_entry(neigh_entry, rif_list_node); } |