lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yvz7+RUsmVco3Xpj@shredder>
Date:   Wed, 17 Aug 2022 17:32:25 +0300
From:   Ido Schimmel <idosch@...dia.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     rafael@...nel.org, linux-pm@...r.kernel.org, vadimp@...lanox.com,
        davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, vadimp@...dia.com, petrm@...dia.com,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Subject: Re: [PATCH v3 1/2] Revert "mlxsw: core: Use different get_trend()
 callbacks for different thermal zones"

On Wed, Aug 17, 2022 at 03:02:26PM +0200, Daniel Lezcano wrote:
> This reverts commit 2dc2f760052da4925482ecdcdc5c94d4a599153c.
> 
> As discussed in the thread:
> 
> https://lore.kernel.org/all/f3c62ebe-7d59-c537-a010-bff366c8aeba@linaro.org/
> 
> the feature provided by commits 2dc2f760052da and 6f73862fabd93 is
> actually already handled by the thermal framework via the cooling
> device state aggregation, thus all this code is pointless.
> 
> No conflict happened when reverting the patch.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> Tested-by: Vadim Pasternak <vadimp@...dia.com>
> ---
>  .../ethernet/mellanox/mlxsw/core_thermal.c    | 23 ++++---------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
> index 3548fe1df7c8..0eb52665b994 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
> @@ -352,7 +352,8 @@ static int mlxsw_thermal_set_trip_hyst(struct thermal_zone_device *tzdev,
>  static int mlxsw_thermal_trend_get(struct thermal_zone_device *tzdev,
>  				   int trip, enum thermal_trend *trend)
>  {
> -	struct mlxsw_thermal *thermal = tzdev->devdata;
> +	struct mlxsw_thermal_module *tz = tzdev->devdata;
> +	struct mlxsw_thermal *thermal = tz->parent;

The reverted commit is a fix, so only reverting it is a problem. It
makes the get_trend() callback assume the wrong type of
'tsdev->devdata'. Patch #2 completely removes these callbacks, so I
suggest squashing both patches.

>  
>  	if (trip < 0 || trip >= MLXSW_THERMAL_NUM_TRIPS)
>  		return -EINVAL;
> @@ -546,22 +547,6 @@ mlxsw_thermal_module_trip_hyst_set(struct thermal_zone_device *tzdev, int trip,
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ