]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlxsw: core_thermal: Fold two loops into one
authorIdo Schimmel <idosch@nvidia.com>
Tue, 30 Jul 2024 13:58:15 +0000 (15:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Aug 2024 01:38:28 +0000 (18:38 -0700)
commitd81d71434036642882b55cf93432bf4a1720a481
tree7fa43aad41d03f0ac0aceec3b7228e6776c22862
parent2a1c9dcb52ddc2916115e4a781f9f2a09c536d97
mlxsw: core_thermal: Fold two loops into one

There is no need to traverse the same array twice. Do it once by folding
both loops into one.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Link: https://patch.msgid.link/81756744ed532aaa9249a83fc08757accfe8b07c.1722345311.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c