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: 50429 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2348523wrn; Mon, 30 Jan 2023 11:09:10 -0800 (PST) X-Google-Smtp-Source: AK7set/by5mYgJ2a5NwcX0/Oy4DCFoqpCo9d9YhZteRRS+9KIpJtcsKJ17sunWg30EhEJdeItaeV X-Received: by 2002:a17:90b:388a:b0:22c:305b:9503 with SMTP id mu10-20020a17090b388a00b0022c305b9503mr17136025pjb.41.1675105750112; Mon, 30 Jan 2023 11:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675105750; cv=none; d=google.com; s=arc-20160816; b=OmwL0o70/T9kwNYheSeEEj3lOxo1qWJ5awVRf4I/J7pUCjVcMBCEfSoEIP6A6NSD/W ynphD7QISz6uWUChCzrq/4U0UK4IFi7anBKKqa44ipc31loA6Tk4J3YJtxkMRTzplRRR 1QvvLScLkieVKjd1xeyrRzjiHgOaDCRsdjl0XYg4CgitUov5kpINzvAAgL8kNFePo6oI t33dJLJtJuolJcmP51CobIbO6WgjJcwsDoRNJvqMYYuOVL1tIZ/J5bo4Fr4lmBy9RSKQ P+b034Ztw29m/8dUQxkR1dLAeTnS1J1r1j7xJ8tJIf8083VqmoXn9IZumSJh4HiZUojb qR/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0DA6vh0+GjoXhrdHgtvGbC9TbSwT4m7WTRyu+ru3VmU=; b=OMsqj+Pv/2xoj0A/1r6xATBPD+4ekntzc2SQAe076htxpTNwfsRfo8UWobelgeNLwP yFRZrJRui7p8/oHgdk2Oho4uFBDc7mTAZRR+5FvmzKJUv13k4JLJSgMkeJCRnmK2nO5N H3HuvziPTLEBodQsypF6SQ+B7iPDl+oxxqAQV3r4nP1PE9pgLmnaWoR+N4aEAb0mxy8T EA/e3dN4rMX6rARmeWoHwN/Ax/Ywohxo08jG1eG5eXnkh31aDsr/me7aXYtqxJlZaWr5 t0yI88cuPZxu28woza5MNzPn4d2fCZD/ABzQbjFV7mQvrFK+1lNrHFkyKsNfBeB6GRqb HbQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb18-20020a17090b4a5200b0022c35527521si14945651pjb.20.2023.01.30.11.08.58; Mon, 30 Jan 2023 11:09:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238045AbjA3THc (ORCPT + 99 others); Mon, 30 Jan 2023 14:07:32 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756475687274232523?= X-GMAIL-MSGID: =?utf-8?q?1756475687274232523?= 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; }