Skip to content

Commit 50b823f

Browse files
vadimp-nvidiajwrdegoede
authored andcommitted
platform: mellanox: mlx-platform: Move bus shift assignment out of the loop
Move assignment of bus shift setting out of the loop to avoid redundant operation. Signed-off-by: Vadim Pasternak <[email protected]> Reviewed-by: Michael Shych <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent cefdbc7 commit 50b823f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6008,10 +6008,11 @@ static int mlxplat_mlxcpld_verify_bus_topology(int *nr)
60086008
shift = *nr - mlxplat_mux_data[i].parent;
60096009
mlxplat_mux_data[i].parent = *nr;
60106010
mlxplat_mux_data[i].base_nr += shift;
6011-
if (shift > 0)
6012-
mlxplat_hotplug->shift_nr = shift;
60136011
}
60146012

6013+
if (shift > 0)
6014+
mlxplat_hotplug->shift_nr = shift;
6015+
60156016
return 0;
60166017
}
60176018

0 commit comments

Comments
 (0)