]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit365c9184bd3de5779fce49756d8b5f88dd565395
tree9ea0e8991f30e44dc411c641768c2e6eed4d3afe
parent68372c6364fc2ca4028b53f90328f125c6d377d7
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