From patchwork Thu Aug 22 19:24:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 821582 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1F1A1C9ED9; Thu, 22 Aug 2024 19:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724355365; cv=none; b=dU5l8e10u/0RPzCKSE/hZznk0PoKQ4LQcAB+Emn26vqLMoBPY1h+QDj7ocDzY/sum+SfSMKXfPCpzcZ2nZIAR7hGYVfsTx49G/tgmN1BgfQbk2I8B43COiSawQxRV5MSRi2rTmVR3i00pC0oGOCdCW6nrQ3roOZfdotQ/Z+HUro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724355365; c=relaxed/simple; bh=T+iCPLKGp1giRFibjyR4hsCwo3Qni64/av4ClDCe4II=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DVElOFQ04cYelTF6U6zZTKPAKoR5E2RLgQnGk1XhY2QbrQo3bn3ZyJ/YgYYmu4+wJi0TViXugXS2nyRjROORc5mXlum/vvLwX8OyC8Hj8x5PmJ4md52Qj7KRzjJiRg8Hh3opDjylHqbqpMNFwRlEqKT7NOVnabqNcw3IPFBEKa8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=sa0Ey35s reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="sa0Ey35s" Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 6.2.0) id 3997934921ddacdf; Thu, 22 Aug 2024 21:36:01 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 8CD556F0E2D; Thu, 22 Aug 2024 21:36:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1724355361; bh=T+iCPLKGp1giRFibjyR4hsCwo3Qni64/av4ClDCe4II=; h=From:Subject:Date; b=sa0Ey35scqCCNm7XeCvsQHJGeCXix7BVXCfNOC+hvETXnmKbY5RgmTUjok9vyPp4I QfjvEpZF6rCbRu+FkhI/Eyljw3IDGAcAP3qdfWzZ+nz2PO9IWsB3TstK1LpQuorZ5r tc9Lwe3Iy/XD3eaKHJ0Z54DZgH2Fv1K98+ainRlO48tkJgXAf9SWL4/VoxrnCZecTq 57Y0ZC8EK6h0vmpsAnzK0h4ACGddT/X962gJYtnk8dQGhOH3lwBpOzfTegETV9WjYS CCxZGdAdLinzGovz4Lns8fSJPgGdkT+L3XSmyZJSDCvg/RwQxwqJONzFyBjeBfX65O y33y36ejUZwrw== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Daniel Lezcano , Lukasz Luba , Zhang Rui , Huisong Li Subject: [PATCH v1 1/3] thermal: core: Rename cdev-to-thermal-zone bind/unbind functions Date: Thu, 22 Aug 2024 21:24:35 +0200 Message-ID: <6093162.lOV4Wx5bFT@rjwysocki.net> In-Reply-To: <12516814.O9o76ZdvQC@rjwysocki.net> References: <12516814.O9o76ZdvQC@rjwysocki.net> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: spam:low X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddruddvtddgudefiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhprghmkfhpucdlfedttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeefudduuedtuefgleffudeigeeitdeufeelvdejgefftdethffhhfethfeljefgteenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuufhprghmkfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepiedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhihhhuihhsohhngheshhhurgifvghirdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=18 Fuz1=18 Fuz2=18 From: Rafael J. Wysocki Rename thermal_zone_cdev_binding() and thermal_zone_cdev_unbinding() to thermal_zone_cdev_bind() and thermal_zone_cdev_unbind(), respectively, to make the naming more consistent with the rest of the code. No functional impact. Link: https://lore.kernel.org/linux-pm/19beefd9-d3f9-4d43-a45d-d241996de2d0@linaro.org/ Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -937,8 +937,8 @@ void print_bind_err_msg(struct thermal_z cdev->type, thermal_zone_trip_id(tz, trip), ret); } -static void thermal_zone_cdev_binding(struct thermal_zone_device *tz, - struct thermal_cooling_device *cdev) +static void thermal_zone_cdev_bind(struct thermal_zone_device *tz, + struct thermal_cooling_device *cdev) { struct thermal_trip_desc *td; @@ -1063,7 +1063,7 @@ __thermal_cooling_device_register(struct /* Update binding information for 'this' new cdev */ list_for_each_entry(pos, &thermal_tz_list, node) - thermal_zone_cdev_binding(pos, cdev); + thermal_zone_cdev_bind(pos, cdev); list_for_each_entry(pos, &thermal_tz_list, node) if (atomic_cmpxchg(&pos->need_update, 1, 0)) @@ -1264,8 +1264,8 @@ unlock_list: } EXPORT_SYMBOL_GPL(thermal_cooling_device_update); -static void thermal_zone_cdev_unbinding(struct thermal_zone_device *tz, - struct thermal_cooling_device *cdev) +static void thermal_zone_cdev_unbind(struct thermal_zone_device *tz, + struct thermal_cooling_device *cdev) { struct thermal_trip_desc *td; @@ -1304,7 +1304,7 @@ void thermal_cooling_device_unregister(s /* Unbind all thermal zones associated with 'this' cdev */ list_for_each_entry(tz, &thermal_tz_list, node) - thermal_zone_cdev_unbinding(tz, cdev); + thermal_zone_cdev_unbind(tz, cdev); mutex_unlock(&thermal_list_lock); @@ -1517,7 +1517,7 @@ thermal_zone_device_register_with_trips( /* Bind cooling devices for this zone */ list_for_each_entry(cdev, &thermal_cdev_list, node) - thermal_zone_cdev_binding(tz, cdev); + thermal_zone_cdev_bind(tz, cdev); mutex_unlock(&thermal_list_lock); @@ -1611,7 +1611,7 @@ void thermal_zone_device_unregister(stru /* Unbind all cdevs associated with 'this' thermal zone */ list_for_each_entry(cdev, &thermal_cdev_list, node) - thermal_zone_cdev_unbinding(tz, cdev); + thermal_zone_cdev_unbind(tz, cdev); mutex_unlock(&thermal_list_lock); From patchwork Thu Aug 22 19:26:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 822061 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BF9528EA; Thu, 22 Aug 2024 19:33:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724355240; cv=none; b=UQ0HMIOi7ku1pmhObaDVo+dSX38zpRhqZCdVG+gmpLWic7iY6Go4jXReDHCrtSmT9PdPv3qSKjZyLerH1SxYqt4pSRvujIeVro/lXFy9HyI7u4GIfbi2M7E7N1D1L/xALaHIUj8HaNHk9QXg7qgFo4noDxHGYPcg9tcVYGet2Vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724355240; c=relaxed/simple; bh=QPkDjNuVRVaT7BYRpVMAc8keX9cRsVBul1f/oRkCzRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Mhl/Qn6N89pKkZGZ470zD8qPaHsFv8zH5A9Hc2b6zEaT8MOnFfExOYeuX3y8DVVxMi4RngytzQqdJCuT97FhZWyfBdjWOK5TvfpghDciOZKZndcCsh5j0TPNnnn/i748cAf4PMMtzKZHf1iowzUPv54uer+APIkODFFTOjppm9U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=Op5BHhGk reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="Op5BHhGk" Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 6.2.0) id 1730b97eb82e1659; Thu, 22 Aug 2024 21:33:56 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id A594F6F0E2D; Thu, 22 Aug 2024 21:33:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1724355236; bh=QPkDjNuVRVaT7BYRpVMAc8keX9cRsVBul1f/oRkCzRE=; h=From:Subject:Date; b=Op5BHhGkCLsSLELLaSVIWLuio3bRHxUwF5aS8ID9dg0iZCibLDGNGtiXUi/JB5FDZ m7b5PqWDR/YQ/jyYKEz13JHkizJsvpQQL7tOB3nWiWor4r7B1nZN6GQmcA/Jorrwim DQWNKNQq5iwUMtcJXXlPPQY0jTRIF3dbBhsGtIrVnYGo7Z5tW7oPBPirAwILrhm0xT REHqQD9qA28R8XDzro9Yh8Jg2EPQkrQ7K48LpLLbJzFfLRfKbli8YqD4mU+WvpzojB /beSbQtPSnicKzNcD+og0gYmYN0Ptsk6gDKhedyjG90oz9r6hFkMwtuQI29190w7HH cVAkNAPiskYIw== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Daniel Lezcano , Lukasz Luba , Zhang Rui , Huisong Li Subject: [PATCH v1 2/3] thermal: core: Drop redundant checks from thermal_bind_cdev_to_trip() Date: Thu, 22 Aug 2024 21:26:09 +0200 Message-ID: <4607540.LvFx2qVVIh@rjwysocki.net> In-Reply-To: <12516814.O9o76ZdvQC@rjwysocki.net> References: <12516814.O9o76ZdvQC@rjwysocki.net> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: spam:low X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddruddvtddgudefiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhprghmkfhpucdlfedttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeefudduuedtuefgleffudeigeeitdeufeelvdejgefftdethffhhfethfeljefgteenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuufhprghmkfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepiedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhihhhuihhsohhngheshhhurgifvghirdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=12 Fuz1=12 Fuz2=12 From: Rafael J. Wysocki Since thermal_bind_cdev_to_trip() is only called by thermal_zone_cdev_binding() under the thermal zone lock and the latter is only called by thermal_zone_device_register_with_trips() and __thermal_cooling_device_register(), under thermal_list_lock in both cases, both lockdep_assert_held() assertions can be dropped from it. Moreover, in both cases thermal_zone_cdev_binding() is called after both tz and cdev have been added to the global lists of thermal zones and cooling device, respectively, so the check against their list nodes in thermal_bind_cdev_to_trip() is redundant and can be dropped either. Link: https://lore.kernel.org/linux-pm/CAJZ5v0jwkc2PB+osSkkYF9vJ1Vpp3MFE=cGQmQ2Xzjb3yjVfJg@mail.gmail.com/ Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 6 ------ 1 file changed, 6 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -775,12 +775,6 @@ static int thermal_bind_cdev_to_trip(str bool upper_no_limit; int result; - lockdep_assert_held(&thermal_list_lock); - lockdep_assert_held(&tz->lock); - - if (list_empty(&tz->node) || list_empty(&cdev->node)) - return -EINVAL; - /* lower default 0, upper default max_state */ if (cool_spec->lower == THERMAL_NO_LIMIT) cool_spec->lower = 0; From patchwork Thu Aug 22 19:27:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 821583 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B93251D1F5B; Thu, 22 Aug 2024 19:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724354888; cv=none; b=gMS09JGLDyIX6JrGOcXQdWH/5JjXoGkp5ArjKzGcpos7WjzVAdSqmN5yPkXHTUWY/+XU1n3puZCQvSZOowcleiZHJv3ZH/I0FS9bC4oNyFN9kBWjlX0KFxQCDZBhJlWqk2ZdMy4N4LQJ71yoVhhgKcYyYeocmzsFYqhKMzjshfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724354888; c=relaxed/simple; bh=O1LyoxRjSU7nj8gurish0iiSeLufBj+YJzvu5eUsPHE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hw5u3qrlMv+XjLOxwyPRm1DsTwEE8BJDQdDEVH6WEUQH+rxmNywmrNG0D0jdBAWbTx+6WrECoOVozXBTNMQzDTyJFUwGjy5Juk+oz7pMaMf4omrsGnrXhADyZI/b3FHRcl6SZMyCtGt3lPt7SPCfDwrdaxKEdYpvgC+Ge9kopfY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=V0CVEONm reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="V0CVEONm" Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 6.2.0) id 839bece893722ce0; Thu, 22 Aug 2024 21:27:58 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id CF95F6F0E2D; Thu, 22 Aug 2024 21:27:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1724354878; bh=O1LyoxRjSU7nj8gurish0iiSeLufBj+YJzvu5eUsPHE=; h=From:Subject:Date; b=V0CVEONmAZ0tODP2P7I1S77jldzH3jXIjJ+mWmbLbPKJX4YmVGu37ZKvcV/OuFJjr JbJaIdPzLtdjep2072pYq68IBsh9++hv8qwhNHJdExpmWVj0Cg0kK6RRsQSvwNKwtu fBARwMr+qVewze8On9MK1zTOK/twGx9qL3M1pEScbDHz+UqWC8/a/ANXS9K+MSfl56 qnCg0AzsTSqlqgCZuJq50zE1AeGU6uTt76nDESgxXSCvIpasi8IT7a/BuploVmYej6 /GzQlTGz072k6bxEHMMJWMCfQOFImemGR4Sh4NDBy0NCd2dnHCwqpPKzmPqnwa3Pa+ bzXSOnwY9lBVw== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Daniel Lezcano , Lukasz Luba , Zhang Rui , Huisong Li Subject: [PATCH v1 3/3] thermal: core: Drop tz field from struct thermal_instance Date: Thu, 22 Aug 2024 21:27:06 +0200 Message-ID: <4934182.GXAFRqVoOG@rjwysocki.net> In-Reply-To: <12516814.O9o76ZdvQC@rjwysocki.net> References: <12516814.O9o76ZdvQC@rjwysocki.net> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: spam:low X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddruddvtddgudefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhprghmkfhpucdlfedttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeefudduuedtuefgleffudeigeeitdeufeelvdejgefftdethffhhfethfeljefgteenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuufhprghmkfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepiedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhihhhuihhsohhngheshhhurgifvghirdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 From: Rafael J. Wysocki After recent changes, it is only used for printing a debug message in __thermal_cdev_update() which arguably is not worth preserving. Drop it along with the dev_dbg() statement using it. Link: https://lore.kernel.org/linux-pm/4a8d8f5a-122d-4c26-b8d6-76a65e42216b@linaro.org Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 2 +- drivers/thermal/thermal_core.h | 1 - drivers/thermal/thermal_helpers.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.h =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.h +++ linux-pm/drivers/thermal/thermal_core.h @@ -213,7 +213,6 @@ int get_tz_trend(struct thermal_zone_dev struct thermal_instance { int id; char name[THERMAL_NAME_LENGTH]; - struct thermal_zone_device *tz; struct thermal_cooling_device *cdev; const struct thermal_trip *trip; bool initialized; Index: linux-pm/drivers/thermal/thermal_helpers.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_helpers.c +++ linux-pm/drivers/thermal/thermal_helpers.c @@ -181,8 +181,6 @@ void __thermal_cdev_update(struct therma /* Make sure cdev enters the deepest cooling state */ list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) { - dev_dbg(&cdev->device, "zone%d->target=%lu\n", - instance->tz->id, instance->target); if (instance->target == THERMAL_NO_TARGET) continue; if (instance->target > target) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -792,7 +792,7 @@ static int thermal_bind_cdev_to_trip(str dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return -ENOMEM; - dev->tz = tz; + dev->cdev = cdev; dev->trip = trip; dev->upper = cool_spec->upper;