From patchwork Thu Aug 10 19:12:32 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: 134184 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp637198vqi; Thu, 10 Aug 2023 12:28:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8AawklVyaXF6Mbpmy5UmgzUQazYOYkwzZh3DRtF8cqF4nCDI3SvgoORHg3JDzsJBV5az4 X-Received: by 2002:a17:907:2ccf:b0:993:f349:c98c with SMTP id hg15-20020a1709072ccf00b00993f349c98cmr2742537ejc.4.1691695680758; Thu, 10 Aug 2023 12:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691695680; cv=none; d=google.com; s=arc-20160816; b=a3ogJTOmG7qAeIgL0ZKQ77SdhN+n1BEOKOV1Vcn9QgbazEc6gm7/jfgOm28v4/VoLy 8Twf9k9tYhsuXCf4etgAKavBJj95xNnebu/L2+mvAfaXc1IYUV4ftRCatlUVrEd0if59 pmXvQwkl+fLYHSM/HHesjZgSvGOdZrnSSpR1ocdc1S8Fl+dxsyi7g3cpapxYnCvDo4+o G0akCnF5FLZnHGlA+J6Go+QCOjdv+miUTYE/irtnmqnpoxgtls5rv2AgIB0O20hElqz2 CFBRFuXisrHDsO8WXvqCQxtpYYcaYMA+SUhoFmwam72IO5PJaBQ6gSQCMQFZ3r9HHEjD WSyw== 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=a127CFoSdsMJrWdM6IhZeIGPCxNlNiewdOe0Q6RLrsE=; fh=aK1D4KsZYozI75a+KCLuU03FxwQ8tTCKnM2T8GQ5ByU=; b=RQUQNRjZMG7BPq0fzuQkzDpQdEGWalXTSgpkbgPT3zD57FM41JYvBn9R7LK8u3CoPS 1hR+edU+IIYlpQ5aVQOiPfW2+npPw0Jarj+Z/BVyI82m/WvvtX1Ex0iFZmF2XYfDTXgr l9pqGbDXs27gUhKiBbyb0/T/HBLgG7dGxWZl3fvR2bCUmPK7NQGdDRaZSXjzofND8dJy m74GGxtUglyw4MHDL2uDryMvxDo3VOhvN/xjy6kZPxEzt0F0YUr/JutLzbIzptUbig4T bO5TkXVIvadix5ghfG+/GueUo0LM/XPlyXpa6lIdADBiKTIKF5TKpU9o6g0/ciEYgl3Q LixA== 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 o3-20020a17090608c300b0099331b3e6f6si1735364eje.661.2023.08.10.12.27.36; Thu, 10 Aug 2023 12:28:00 -0700 (PDT) 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 S236368AbjHJTR5 (ORCPT + 99 others); Thu, 10 Aug 2023 15:17:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236323AbjHJTRt (ORCPT ); Thu, 10 Aug 2023 15:17:49 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D085D2702; Thu, 10 Aug 2023 12:17:48 -0700 (PDT) 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.2.0) id 29b733ff90bc66d8; Thu, 10 Aug 2023 21:17:47 +0200 Authentication-Results: v370.home.net.pl; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=rjwysocki.net (client-ip=195.136.19.94; helo=[195.136.19.94]; envelope-from=rjw@rjwysocki.net; receiver=) 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 v370.home.net.pl (Postfix) with ESMTPSA id E1D4F662742; Thu, 10 Aug 2023 21:17:46 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Srinivas Pandruvada , Zhang Rui , Daniel Lezcano Subject: [PATCH v1 3/7] thermal: intel: intel_soc_dts_iosf: Pass sensors to update_trip_temp() Date: Thu, 10 Aug 2023 21:12:32 +0200 Message-ID: <1874380.tdWV9SEqCh@kreacher> In-Reply-To: <5713357.DvuYhMxLoT@kreacher> References: <5713357.DvuYhMxLoT@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrleeigddufeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdp rhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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: INBOX X-GMAIL-THRID: 1773871490364606879 X-GMAIL-MSGID: 1773871490364606879 From: Rafael J. Wysocki After previous changes, update_trip_temp() only uses its dts argument to get to the sensors field in the struct intel_soc_dts_sensor_entry object pointed to by that argument, so pass the value of that field directly to it instead. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/intel/intel_soc_dts_iosf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: linux-pm/drivers/thermal/intel/intel_soc_dts_iosf.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/intel_soc_dts_iosf.c +++ linux-pm/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -66,7 +66,7 @@ static int sys_get_trip_temp(struct ther return 0; } -static int update_trip_temp(struct intel_soc_dts_sensor_entry *dts, +static int update_trip_temp(struct intel_soc_dts_sensors *sensors, int thres_index, int temp) { int status; @@ -78,7 +78,6 @@ static int update_trip_temp(struct intel u32 store_te_out; u32 te_out; u32 int_enable_bit = SOC_DTS_TE_APICA_ENABLE; - struct intel_soc_dts_sensors *sensors = dts->sensors; if (sensors->intr_type == INTEL_SOC_DTS_INTERRUPT_MSI) int_enable_bit |= SOC_DTS_TE_MSI_ENABLE; @@ -162,7 +161,7 @@ static int configure_trip(struct intel_s { int ret; - ret = update_trip_temp(dts, thres_index, temp); + ret = update_trip_temp(dts->sensors, thres_index, temp); if (ret) return ret; @@ -182,7 +181,7 @@ static int sys_set_trip_temp(struct ther return -EINVAL; mutex_lock(&sensors->dts_update_lock); - status = update_trip_temp(dts, trip, temp); + status = update_trip_temp(sensors, trip, temp); mutex_unlock(&sensors->dts_update_lock); return status;