mlxsw: spectrum_router: Replace if statement with a switch statement
authorIdo Schimmel <idosch@nvidia.com>
Wed, 19 May 2021 12:08:19 +0000 (15:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 May 2021 19:47:47 +0000 (12:47 -0700)
commit7725c1c8f73260de2ef0d01ca23b64260fc66ffd
tree9ea0e8991f30e44dc411c641768c2e6eed4d3afe
parenteb0e4d59b6edbe678ecfc5d5b77608b634057f08
mlxsw: spectrum_router: Replace if statement with a switch statement

The code was written when only two multipath hash policies were present,
so the if statement was sufficient. The next patch and future patches
are going to add support for more policies, so move to a switch
statement.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c