]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: core: Drop redundant lockdep_assert_held()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Aug 2024 16:30:42 +0000 (18:30 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Sep 2024 10:33:15 +0000 (12:33 +0200)
Along the lines of commit 24aad192c671 ("thermal: core: Drop
redundant checks from thermal_bind_cdev_to_trip()") notice that
thermal_unbind_cdev_from_trip() is only called by
thermal_zone_cdev_unbind() under the thermal zone lock, so it
need not use lockdep_assert_held() for that lock.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3341369.44csPzL39Z@rjwysocki.net
drivers/thermal/thermal_core.c

index 4187f207bce91afc9bac834880644bdb7ff4794a..9215a7bc92c79385b08dbee0d6118e16188f80ac 100644 (file)
@@ -891,8 +891,6 @@ static void thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
 {
        struct thermal_instance *pos, *next;
 
-       lockdep_assert_held(&tz->lock);
-
        mutex_lock(&cdev->lock);
        list_for_each_entry_safe(pos, next, &tz->thermal_instances, tz_node) {
                if (pos->trip == trip && pos->cdev == cdev) {