From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
michaelsh@nvidia.com, crajank@nvidia.com, fradensky@nvidia.com,
oleksandrs@nvidia.com, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH platform-next v8 4/7] platform: mellanox: Cosmetic changes to improve code style
Date: Tue, 15 Apr 2025 17:40:02 +0300 (EEST) [thread overview]
Message-ID: <fd153f13-e114-411d-2664-550ca73eb22e@linux.intel.com> (raw)
In-Reply-To: <20250412091843.33943-5-vadimp@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 2188 bytes --]
On Sat, 12 Apr 2025, Vadim Pasternak wrote:
> Replace in 'for' loop - /i >= 0 ; i--/i >= 0 ;i--/.
Space is in the wrong place in the replace part.
> Replace in 'while' loop - /(--i >= 0)/(--i)/.
>
> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
> ---
> v5->v6
> Comments pointed out by Ilpo:
> - Fix 'while' loop in erro flow.
> ---
> drivers/platform/mellanox/mlx-platform.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlx-platform.c b/drivers/platform/mellanox/mlx-platform.c
> index 29d938265676..4c7ff22117a6 100644
> --- a/drivers/platform/mellanox/mlx-platform.c
> +++ b/drivers/platform/mellanox/mlx-platform.c
> @@ -7807,7 +7807,7 @@ static int mlxplat_platdevs_init(struct mlxplat_priv *priv)
> while (i--)
> platform_device_unregister(priv->pdev_dpu[i]);
> fail_platform_wd_register:
> - while (--i >= 0)
> + while (i--)
> platform_device_unregister(priv->pdev_wd[i]);
> fail_platform_fan_register:
> if (mlxplat_regs_io)
> @@ -7828,7 +7828,7 @@ static void mlxplat_platdevs_exit(struct mlxplat_priv *priv)
>
> for (i = MLXPLAT_CPLD_DPU_MAX_DEVS - 1; i >= 0; i--)
> platform_device_unregister(priv->pdev_dpu[i]);
> - for (i = MLXPLAT_CPLD_WD_MAX_DEVS - 1; i >= 0 ; i--)
> + for (i = MLXPLAT_CPLD_WD_MAX_DEVS - 1; i >= 0; i--)
> platform_device_unregister(priv->pdev_wd[i]);
> if (priv->pdev_fan)
> platform_device_unregister(priv->pdev_fan);
> @@ -7873,7 +7873,7 @@ static int mlxplat_i2c_mux_topology_init(struct mlxplat_priv *priv)
> return mlxplat_i2c_mux_complition_notify(priv, NULL, NULL);
>
> fail_platform_mux_register:
> - while (--i >= 0)
> + while (i--)
> platform_device_unregister(priv->pdev_mux[i]);
> return err;
> }
> @@ -7882,7 +7882,7 @@ static void mlxplat_i2c_mux_topology_exit(struct mlxplat_priv *priv)
> {
> int i;
>
> - for (i = mlxplat_mux_num - 1; i >= 0 ; i--) {
> + for (i = mlxplat_mux_num - 1; i >= 0; i--) {
> if (priv->pdev_mux[i])
> platform_device_unregister(priv->pdev_mux[i]);
> }
>
next prev parent reply other threads:[~2025-04-15 14:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 9:18 [PATCH platform-next v8 0/7] Add support for new systems, amendments Vadim Pasternak
2025-04-12 9:18 ` [PATCH platform-next v8 1/7] platform/mellanox: Rename field to improve code readability Vadim Pasternak
2025-04-12 9:18 ` [PATCH platform-next v8 2/7] platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU Vadim Pasternak
2025-04-15 14:32 ` Ilpo Järvinen
2025-04-12 9:18 ` [PATCH platform-next v8 3/7] platform: mellanox: Introduce support of Nvidia smart switch Vadim Pasternak
2025-04-15 14:38 ` Ilpo Järvinen
2025-04-12 9:18 ` [PATCH platform-next v8 4/7] platform: mellanox: Cosmetic changes to improve code style Vadim Pasternak
2025-04-15 14:40 ` Ilpo Järvinen [this message]
2025-04-12 9:18 ` [PATCH platform-next v8 5/7] platform: mellanox: mlx-platform: Add support for new Nvidia system Vadim Pasternak
2025-04-15 14:48 ` Ilpo Järvinen
2025-04-12 9:18 ` [PATCH platform-next v8 6/7] platform: mellanox: nvsw-sn2200: Add support for new system flavour Vadim Pasternak
2025-04-15 15:00 ` Ilpo Järvinen
2025-04-12 9:18 ` [PATCH platform-next v8 7/7] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
2025-04-15 15:02 ` Ilpo Järvinen
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=fd153f13-e114-411d-2664-550ca73eb22e@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=crajank@nvidia.com \
--cc=fradensky@nvidia.com \
--cc=hdegoede@redhat.com \
--cc=michaelsh@nvidia.com \
--cc=oleksandrs@nvidia.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@nvidia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.