On Tue, Feb 21, 2023 at 7:08 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
In the work of the thermal zone device self-encapsulation, let's pass
the field value instead of dereferencing them in the traces which
force us to export publicly the thermal_zone_device structure.
No fonctionnal change intended.
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
drivers/thermal/gov_fair_share.c | 2 +-
drivers/thermal/gov_power_allocator.c | 4 ++--
drivers/thermal/gov_step_wise.c | 2 +-
drivers/thermal/thermal_core.c | 5 ++--
include/trace/events/thermal.h | 24 +++++++++----------
.../trace/events/thermal_power_allocator.h | 12 +++++-----
6 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/drivers/thermal/gov_fair_share.c b/drivers/thermal/gov_fair_share.c
index aad7d5fe3a14..e6c21abaaa80 100644
--- a/drivers/thermal/gov_fair_share.c
+++ b/drivers/thermal/gov_fair_share.c
@@ -35,7 +35,7 @@ static int get_trip_level(struct thermal_zone_device *tz)
* point, in which case, trip_point = count - 1
*/
if (count > 0)
- trace_thermal_zone_trip(tz, count - 1, trip.type);
+ trace_thermal_zone_trip(tz->type, tz->id, count - 1, trip.type);
Haven't you introduced an accessor for tz->id in this series? Why not
use it here?
And there can be an analogous accessor for tz->type.
If there are accessors like that, they should be used consistently
everywhere as applicable IMO.