From patchwork Tue Jan 24 19:17:09 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: 47838 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2331728wrn; Tue, 24 Jan 2023 11:22:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvGt2+H32cP6aYMS4Wh7rBCZqfCk914uNlxbuGcweHh2O6+s2/2l0Vg3gnimrqlOceddo4T X-Received: by 2002:a17:906:c58:b0:78d:f456:1ed0 with SMTP id t24-20020a1709060c5800b0078df4561ed0mr43429813ejf.33.1674588128889; Tue, 24 Jan 2023 11:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674588128; cv=none; d=google.com; s=arc-20160816; b=GNACVIEUueFfUB984ER7ik9nlg9wXmtja7kuG8XJ+YZWETrrp3HVC/6RzoeD90/jdh +4JbrHG+Wgo8vOi6aZvzeF63gXeiZuGNN8CzsRTlvNsaDceTElQ24GR351/53XEmN7gD BhZvmA5DPhw9suYYIULCkmh1SEyrjEq555BGqsY/99626jbekohoghGV2xqSTuJ7muUl o7/IoPQfXr8UBwANIhfRI2iqMcRsyjyi0VLbyDArh1kUANXir+Vhugs6NAHk/bWrLz+a KUSBGKLCtrJIUGqtpn1Wsa937TH2hCFVP2fv+ZrB5wmVMuG7rX/+JGcJ85NIlrwClGAI LzPQ== 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=LZX6KVArSokyQzHIR97sCQr7AxJyZAUEzcl/MNAeJm4=; b=neCpFid9DcBUgfMvVYy4S2T6fqg/b34xu7gO1kpHS6MCXpEtu8WRlJmS2hZQiAA0ex bl4FIa3kUjyuUPkinoXuxBqYhCbsYvNA75BOi6eA40mLmJt9Tnh0iaXEDa2hVukxubwD z03IHGZnWWLGysN7I8fEj2UsjbrD8p+ki0GvGfsIi/RvQt3oP8o2T5FfCZltqXGTuyu5 Y2ZHhm1zEvQKTEcRrKKVJCY+DWF+PlIrlVKY9dfJhmduETsvnQ883Hipvy2EKa+skVEM 8fdST+GR++ty1Ig+EHXywg7/m4qTeCIK1zHIn5Tz0Mh3gQj1jhfQ5g21G5QyfhyMtWDh us8w== 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 s22-20020a170906221600b00876a2339b76si3432044ejs.400.2023.01.24.11.21.45; Tue, 24 Jan 2023 11:22:08 -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 S234547AbjAXTTR (ORCPT + 99 others); Tue, 24 Jan 2023 14:19:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234343AbjAXTTN (ORCPT ); Tue, 24 Jan 2023 14:19:13 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A561B32522; Tue, 24 Jan 2023 11:19:10 -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 489f2acd983c5755; Tue, 24 Jan 2023 20:19:09 +0100 Received: from kreacher.localnet (unknown [213.134.189.30]) (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 501A47A644A; Tue, 24 Jan 2023 20:19:08 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Linux ACPI , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v1 4/6] thermal: intel: int340x: Rearrange int340x_thermal_read_trips() Date: Tue, 24 Jan 2023 20:17:09 +0100 Message-ID: <3238718.44csPzL39Z@kreacher> In-Reply-To: <12159228.O9o76ZdvQC@kreacher> References: <12159228.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.189.30 X-CLIENT-HOSTNAME: 213.134.189.30 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedruddvtddguddvudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepvddufedrudefgedrudekledrfedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekledrfedtpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthho pehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrgh 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?1755932922117214003?= X-GMAIL-MSGID: =?utf-8?q?1755932922117214003?= From: Rafael J. Wysocki Use local variables trips and adev to store the addresses of the given thermal zone's trip point table and ACPI device, respectively, and use them to shorten some code lines. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Index: linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -66,25 +66,27 @@ static struct thermal_zone_device_ops in int int340x_thermal_read_trips(struct int34x_thermal_zone *int34x_zone) { + struct thermal_trip *trips = int34x_zone->trips; + struct acpi_device *adev = int34x_zone->adev; int trip_cnt; int i, ret; trip_cnt = int34x_zone->aux_trip_nr; - ret = thermal_acpi_trip_critical(int34x_zone->adev, &int34x_zone->trips[trip_cnt]); + ret = thermal_acpi_trip_critical(adev, &trips[trip_cnt]); if (!ret) trip_cnt++; - ret = thermal_acpi_trip_hot(int34x_zone->adev, &int34x_zone->trips[trip_cnt]); + ret = thermal_acpi_trip_hot(adev, &trips[trip_cnt]); if (!ret) trip_cnt++; - ret = thermal_acpi_trip_passive(int34x_zone->adev, &int34x_zone->trips[trip_cnt]); + ret = thermal_acpi_trip_passive(adev, &trips[trip_cnt]); if (!ret) trip_cnt++; for (i = 0; i < INT340X_THERMAL_MAX_ACT_TRIP_COUNT; i++) { - ret = thermal_acpi_trip_active(int34x_zone->adev, i, &int34x_zone->trips[trip_cnt]); + ret = thermal_acpi_trip_active(adev, i, &trips[trip_cnt]); if (ret) break;