thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 Oct 2023 15:45:42 +0000 (17:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:14 +0000 (16:19 -0800)
commitee82479f5d740968828a1fde41598f1d1e62eee6
treec8222cb747b5666097c6c12c0431573b71939eac
parent0e99996615750c0a61457510df71b4efb28da313
thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()

commit 108ffd12be24ba1d74b3314df8db32a0a6d55ba5 upstream.

The lockdep assertion in thermal_zone_trip_id() triggers when the
trip point sysfs attribute of a thermal instance is read, because
there is no thermal zone locking in that code path.

This is not verly useful, though, because there is no mechanism by which
the location of the trips[] table in a thermal zone or its size can
change after binding cooling devices to the trips in that thermal
zone and before those cooling devices are unbound from them.  Thus
it is not in fact necessary to hold the thermal zone lock when
thermal_zone_trip_id() is called from trip_point_show() and so the
lockdep asserion in the former is invalid.

Accordingly, drop that lockdep assertion.

Fixes: 2c7b4bfadef0 ("thermal: core: Store trip pointer in struct thermal_instance")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/thermal_trip.c