From: Ido Schimmel <idosch@nvidia.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: rafael@kernel.org, linux-pm@vger.kernel.org, vadimp@mellanox.com,
davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, vadimp@nvidia.com,
petrm@nvidia.com, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH v3 1/2] Revert "mlxsw: core: Use different get_trend() callbacks for different thermal zones"
Date: Wed, 17 Aug 2022 17:32:25 +0300 [thread overview]
Message-ID: <Yvz7+RUsmVco3Xpj@shredder> (raw)
In-Reply-To: <20220817130227.2268127-1-daniel.lezcano@linaro.org>
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@linaro.org>
> Tested-by: Vadim Pasternak <vadimp@nvidia.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;
> }
prev parent reply other threads:[~2022-08-17 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 13:02 [PATCH v3 1/2] Revert "mlxsw: core: Use different get_trend() callbacks for different thermal zones" Daniel Lezcano
2022-08-17 13:02 ` [PATCH v3 2/2] Revert "mlxsw: core: Add the hottest thermal zone detection" Daniel Lezcano
2022-08-17 14:36 ` Ido Schimmel
2022-08-17 14:32 ` Ido Schimmel [this message]
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=Yvz7+RUsmVco3Xpj@shredder \
--to=idosch@nvidia.com \
--cc=daniel.lezcano@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=rafael@kernel.org \
--cc=vadimp@mellanox.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).