mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 13:27:57 +02:00
platform: mellanox: Cosmetic changes to improve code style
Replace in 'for' loop - /i >= 0 ; i--/i >= 0 ;i--/. 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> Link: https://lore.kernel.org/r/20250421092051.7687-4-vadimp@nvidia.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
783259e9b1
commit
f48cf5ee4f
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user