Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1517168rdb; Mon, 2 Oct 2023 12:00:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmLJfbSkidHxRRlVC3JbYegJ8V0TK0PWu0TxHngoDJCrSeigwifI/woK1na4GVaiIglw/B X-Received: by 2002:a05:6358:9191:b0:134:d617:e2c9 with SMTP id j17-20020a056358919100b00134d617e2c9mr14245731rwa.29.1696273230364; Mon, 02 Oct 2023 12:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696273230; cv=none; d=google.com; s=arc-20160816; b=YObRL2W9Rn0YbbUPNqe+kid8N5wSdhPrjjm5d33gNCyGBS7VfeGj5cDYVkRUOyqDVn SwSG2S8tzPVZxcYd0yP8Lr5iXRZ0Ktx7S4w9TBY17wsd70HjXnECVyG69VJnc8vbKZ1E rMe+la8LAgmc2hOlYnev+cxwU/YPLAfTQB9suHn26jMxroHQDPiay5ZTOcPWU7ay8sEw B1zWar/0VouRttPpgt9rR3M43jVxlifGizXzNXxdq/8PpLN/IbUvq2+mHocDrbIjeGnq b5qY/nUFP7w3MN2krQcA60Lu8IHPH5k//Nbue++yagf3VSNQAlec+BEZELr5x43Lemyf YSeQ== 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 :message-id:date:subject:cc:to:from; bh=zDFq+cqQDk6Y7P1MGxbllgLtCnp+Q9JH1i292SIqL5U=; fh=99EXAs+vKBd0HJG3OZyygM2izuzSBDrYNgeLDvqQNA4=; b=ZShWuqLZniG+cvprhkMlc1LHPjhQ8YJ5VXElF5w1n5qzUnmo37VRg63MeVCl0jt7Y9 9BNx0swrw45ohLzcWiX6Im79TOVLDqckjXstrb3EnBQ4WiOWTcWvXvZQID12NNYjJ/se EjL+Iwk3P0wqAB5fedkUGum/sNTIzfAIGnejoK0SRBeKHdxAujrHB0rqagLHAH9EPZsS gpok+GZFEZ2zPhcyARvaAkfY5fhYkPgSAJmnfsxOqZn3MvS+hzXwFB/3SmZ9yzlyz2Oi wg8yBADGfPE+T13CV/psxd6UK82bsjcIuUqxn9CLjhY/G/30bQzQcKi+GK4Xo135tHwK 5mAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id eg23-20020a056a00801700b0068fa57d2486si26899356pfb.125.2023.10.02.12.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 12:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C34DA80FC724; Mon, 2 Oct 2023 11:04:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238751AbjJBSES (ORCPT + 99 others); Mon, 2 Oct 2023 14:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238720AbjJBSEK (ORCPT ); Mon, 2 Oct 2023 14:04:10 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5135FDA; Mon, 2 Oct 2023 11:04:07 -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 af39c7079f2a98ab; Mon, 2 Oct 2023 20:04:05 +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 v370.home.net.pl (Postfix) with ESMTPSA id 51AB66658DF; Mon, 2 Oct 2023 20:04:05 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Linux ACPI , Daniel Lezcano , Zhang Rui , Srinivas Pandruvada , "Rafael J. Wysocki" Subject: [PATCH v1 0/4] thermal: Improve iteration over trip points Date: Mon, 02 Oct 2023 19:58:11 +0200 Message-ID: <4871671.31r3eYUQgx@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelgdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthht oheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 11:04:25 -0700 (PDT) Hi All, It turns out that the notification-handling code in the ACPI thermal driver can be rearranged to iterate over trip points once, with the help of for_each_thermal_trip() called directly under the zone lock, so patch [1/4] adds a helper function for that and patch [2/4] changes the ACPI thermal driver in accordance with this observation. Next, patch [3/4] drops thermal_zone_device_exec() that is not used any more and patch [4/4] changes the int340x thermal driver to also use the new helper to iterate over trip points, so it need not make risky assumptions regarding the core functionality. Thanks!