projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cefdbc7
)
platform: mellanox: mlx-platform: Move bus shift assignment out of the loop
author
Vadim Pasternak
<vadimp@nvidia.com>
Wed, 8 Feb 2023 06:33:29 +0000
(08:33 +0200)
committer
Hans de Goede
<hdegoede@redhat.com>
Mon, 13 Feb 2023 11:07:50 +0000
(12:07 +0100)
Move assignment of bus shift setting out of the loop to avoid redundant
operation.
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link:
https://lore.kernel.org/r/20230208063331.15560-13-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/mlx-platform.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/mlx-platform.c
b/drivers/platform/x86/mlx-platform.c
index
60062d9
..
7b6779c
100644
(file)
--- a/
drivers/platform/x86/mlx-platform.c
+++ b/
drivers/platform/x86/mlx-platform.c
@@
-6008,10
+6008,11
@@
static int mlxplat_mlxcpld_verify_bus_topology(int *nr)
shift = *nr - mlxplat_mux_data[i].parent;
mlxplat_mux_data[i].parent = *nr;
mlxplat_mux_data[i].base_nr += shift;
- if (shift > 0)
- mlxplat_hotplug->shift_nr = shift;
}
+ if (shift > 0)
+ mlxplat_hotplug->shift_nr = shift;
+
return 0;
}