From patchwork Mon Jan 30 19:07:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 648867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60E86C54EAA for ; Mon, 30 Jan 2023 19:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236703AbjA3THb (ORCPT ); Mon, 30 Jan 2023 14:07:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236432AbjA3THa (ORCPT ); Mon, 30 Jan 2023 14:07:30 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A397538B5C; Mon, 30 Jan 2023 11:07:28 -0800 (PST) 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 5.1.0) id e536acd3fe07cf94; Mon, 30 Jan 2023 20:07:26 +0100 Received: from kreacher.localnet (unknown [213.134.169.112]) (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 v370.home.net.pl (Postfix) with ESMTPSA id 246EA2528287; Mon, 30 Jan 2023 20:07:26 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM , Srinivas Pandruvada Cc: Zhang Rui , Linux ACPI , LKML , David Box Subject: [PATCH v1 8/8] thermal: intel: intel_pch: Refer to thermal zone name directly Date: Mon, 30 Jan 2023 20:07:17 +0100 Message-ID: <837557782.0ifERbkFSE@kreacher> In-Reply-To: <1751684.VLH7GnMWUR@kreacher> References: <1751684.VLH7GnMWUR@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.112 X-CLIENT-HOSTNAME: 213.134.169.112 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudefvddguddvfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepvddufedrudefgedrudeiledrudduvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieelrdduuddvpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdho rhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrvhhiugdrvgdrsghogieslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Rafael J. Wysocki Make intel_pch_thermal_probe() use a const char pointer instead of a struct board_info one for accessing the thermal zone name. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano --- BTW, Srinivas, I'm wondering if user space would be terribly confused by changing this driver to use "Intel PCH" as the thermal zone name of all of the supported platforms? --- drivers/thermal/intel/intel_pch_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c +++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c @@ -175,7 +175,7 @@ static int intel_pch_thermal_probe(struc const struct pci_device_id *id) { enum pch_board_ids board_id = id->driver_data; - const struct board_info *bi = &board_info[board_id]; + const char *zone_name = board_info[board_id].name; struct pch_thermal_device *ptd; u16 trip_temp; int nr_trips; @@ -249,12 +249,12 @@ read_trips: nr_trips += pch_wpt_add_acpi_psv_trip(ptd, nr_trips); - ptd->tzd = thermal_zone_device_register_with_trips(bi->name, ptd->trips, + ptd->tzd = thermal_zone_device_register_with_trips(zone_name, ptd->trips, nr_trips, 0, ptd, &tzd_ops, NULL, 0, 0); if (IS_ERR(ptd->tzd)) { dev_err(&pdev->dev, "Failed to register thermal zone %s\n", - bi->name); + zone_name); err = PTR_ERR(ptd->tzd); goto error_cleanup; }