netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes
       [not found] <20230525140135.3589917-1-daniel.lezcano@linaro.org>
@ 2023-05-25 14:01 ` Daniel Lezcano
  2023-05-26  9:20   ` Simon Horman
  2023-05-31 22:10   ` Saeed Mahameed
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-05-25 14:01 UTC (permalink / raw)
  To: daniel.lezcano, rafael
  Cc: linux-pm, thierry.reding, Sandipan Patra, Gal Pressman,
	Saeed Mahameed, Jakub Kicinski, Leon Romanovsky, David S. Miller,
	Eric Dumazet, Paolo Abeni,
	open list:MELLANOX MLX5 core VPI driver,
	open list:MELLANOX MLX5 core VPI driver, open list

The thermal framework is migrating to the generic trip points. The set
of changes also implies a self-encapsulation of the thermal zone
device structure where the internals are no longer directly accessible
but with accessors.

Use the new API instead, so the next changes can be pushed in the
thermal framework without this driver failing to compile.

No functional changes intended.

Cc: Sandipan Patra <spatra@nvidia.com>
Cc: Gal Pressman <gal@nvidia.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/thermal.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/thermal.c b/drivers/net/ethernet/mellanox/mlx5/core/thermal.c
index e47fa6fb836f..20bb5eb266c1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/thermal.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/thermal.c
@@ -45,7 +45,7 @@ static int mlx5_thermal_get_mtmp_temp(struct mlx5_core_dev *mdev, u32 id, int *p
 static int mlx5_thermal_get_temp(struct thermal_zone_device *tzdev,
 				 int *p_temp)
 {
-	struct mlx5_thermal *thermal = tzdev->devdata;
+	struct mlx5_thermal *thermal = thermal_zone_device_priv(tzdev);
 	struct mlx5_core_dev *mdev = thermal->mdev;
 	int err;
 
@@ -81,12 +81,13 @@ int mlx5_thermal_init(struct mlx5_core_dev *mdev)
 		return -ENOMEM;
 
 	thermal->mdev = mdev;
-	thermal->tzdev = thermal_zone_device_register(data,
-						      MLX5_THERMAL_NUM_TRIPS,
-						      MLX5_THERMAL_TRIP_MASK,
-						      thermal,
-						      &mlx5_thermal_ops,
-						      NULL, 0, MLX5_THERMAL_POLL_INT_MSEC);
+	thermal->tzdev = thermal_zone_device_register_with_trips(data,
+								 NULL,
+								 MLX5_THERMAL_NUM_TRIPS,
+								 MLX5_THERMAL_TRIP_MASK,
+								 thermal,
+								 &mlx5_thermal_ops,
+								 NULL, 0, MLX5_THERMAL_POLL_INT_MSEC);
 	if (IS_ERR(thermal->tzdev)) {
 		dev_err(mdev->device, "Failed to register thermal zone device (%s) %ld\n",
 			data, PTR_ERR(thermal->tzdev));
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes
  2023-05-25 14:01 ` [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes Daniel Lezcano
@ 2023-05-26  9:20   ` Simon Horman
  2023-05-31 22:10   ` Saeed Mahameed
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-05-26  9:20 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rafael, linux-pm, thierry.reding, Sandipan Patra, Gal Pressman,
	Saeed Mahameed, Jakub Kicinski, Leon Romanovsky, David S. Miller,
	Eric Dumazet, Paolo Abeni,
	open list:MELLANOX MLX5 core VPI driver,
	open list:MELLANOX MLX5 core VPI driver, open list

On Thu, May 25, 2023 at 04:01:28PM +0200, Daniel Lezcano wrote:
> The thermal framework is migrating to the generic trip points. The set
> of changes also implies a self-encapsulation of the thermal zone
> device structure where the internals are no longer directly accessible
> but with accessors.
> 
> Use the new API instead, so the next changes can be pushed in the
> thermal framework without this driver failing to compile.
> 
> No functional changes intended.
> 
> Cc: Sandipan Patra <spatra@nvidia.com>
> Cc: Gal Pressman <gal@nvidia.com>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes
  2023-05-25 14:01 ` [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes Daniel Lezcano
  2023-05-26  9:20   ` Simon Horman
@ 2023-05-31 22:10   ` Saeed Mahameed
  2023-06-07 13:17     ` Daniel Lezcano
  1 sibling, 1 reply; 4+ messages in thread
From: Saeed Mahameed @ 2023-05-31 22:10 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rafael, linux-pm, thierry.reding, Sandipan Patra, Gal Pressman,
	Saeed Mahameed, Jakub Kicinski, Leon Romanovsky, David S. Miller,
	Eric Dumazet, Paolo Abeni,
	open list:MELLANOX MLX5 core VPI driver,
	open list:MELLANOX MLX5 core VPI driver, open list

On 25 May 16:01, Daniel Lezcano wrote:
>The thermal framework is migrating to the generic trip points. The set
>of changes also implies a self-encapsulation of the thermal zone
>device structure where the internals are no longer directly accessible
>but with accessors.
>
>Use the new API instead, so the next changes can be pushed in the
>thermal framework without this driver failing to compile.
>
>No functional changes intended.
>

I see this patch is part of a large series, do you expect me to re-post to
net-next or you are going to submit via another tree ? 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes
  2023-05-31 22:10   ` Saeed Mahameed
@ 2023-06-07 13:17     ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-06-07 13:17 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: rafael, linux-pm, thierry.reding, Sandipan Patra, Gal Pressman,
	Saeed Mahameed, Jakub Kicinski, Leon Romanovsky, David S. Miller,
	Eric Dumazet, Paolo Abeni,
	open list:MELLANOX MLX5 core VPI driver,
	open list:MELLANOX MLX5 core VPI driver, open list

On 01/06/2023 00:10, Saeed Mahameed wrote:
> On 25 May 16:01, Daniel Lezcano wrote:
>> The thermal framework is migrating to the generic trip points. The set
>> of changes also implies a self-encapsulation of the thermal zone
>> device structure where the internals are no longer directly accessible
>> but with accessors.
>>
>> Use the new API instead, so the next changes can be pushed in the
>> thermal framework without this driver failing to compile.
>>
>> No functional changes intended.
>>
> 
> I see this patch is part of a large series, do you expect me to re-post to
> net-next or you are going to submit via another tree ?

Sorry for the delay.

Yes, this patch is targeted for the thermal tree. The last patch of the 
series depends on it as it moves the thermal zone device structure to 
the private thermal header, thus the structure internals won't be 
accessible from this driver anymore.


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-07 13:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230525140135.3589917-1-daniel.lezcano@linaro.org>
2023-05-25 14:01 ` [PATCH 1/8] net/mlx5: Update the driver with the recent thermal changes Daniel Lezcano
2023-05-26  9:20   ` Simon Horman
2023-05-31 22:10   ` Saeed Mahameed
2023-06-07 13:17     ` Daniel Lezcano

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).