From: Vadim Pasternak <vadimp@nvidia.com>
To: <hdegoede@redhat.com>
Cc: <platform-driver-x86@vger.kernel.org>,
Vadim Pasternak <vadimp@nvidia.com>
Subject: [PATCH platform-next 12/13] platform: mellanox: mlx-platform: Move bus shift assignment out of the loop
Date: Wed, 8 Feb 2023 08:33:29 +0200 [thread overview]
Message-ID: <20230208063331.15560-13-vadimp@nvidia.com> (raw)
In-Reply-To: <20230208063331.15560-1-vadimp@nvidia.com>
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>
---
drivers/platform/x86/mlx-platform.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 482c62988a6f..1bf9ef6e8c97 100644
--- 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;
}
--
2.20.1
next prev parent reply other threads:[~2023-02-08 6:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 6:33 [PATCH platform-next 00/13] platform/x86: Add new systems and features for Nvidia systems Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 01/13] platform: mellanox: Introduce support for rack manager switch Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 02/13] platform: mellanox: Change "reset_pwr_converter_fail" attribute Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 03/13] platform: mellanox: Cosmetic changes - rename to more common name Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 04/13] platform: mellanox: Introduce support for next-generation 800GB/s switch Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 05/13] platform: mellanox: Introduce support of new Nvidia L1 switch Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 06/13] platform: mellanox: Split initialization procedure Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 07/13] platform: mellanox: Split logic in init and exit flow Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 08/13] platform: mellanox: Extend all systems with I2C notification callback Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 09/13] platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 10/13] platform_data/mlxreg: Add field with mapped resource address Vadim Pasternak
2023-02-08 6:33 ` [PATCH platform-next 11/13] platform: mellanox: mlx-platform: Add mux selection register to regmap Vadim Pasternak
2023-02-08 6:33 ` Vadim Pasternak [this message]
2023-02-08 6:33 ` [PATCH platform-next 13/13] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
2023-02-10 17:46 ` [PATCH platform-next 00/13] platform/x86: Add new systems and features for Nvidia systems Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230208063331.15560-13-vadimp@nvidia.com \
--to=vadimp@nvidia.com \
--cc=hdegoede@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox