Received: by 2002:a05:6500:1b8b:b0:1f9:713f:1f5d with SMTP id df11csp1099802lqb; Thu, 23 May 2024 09:05:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbRTm9xWdawZyyISZHPN2G46BfEXITPdiXU5m88iKSUlhPAjVjS2GkjM+OzF6vwxs6kmQJPucC6SQtyv5EP2MkVOoD4YnNPKKgqhRx6A== X-Google-Smtp-Source: AGHT+IH283VCGi1CCS59N9okmWwMPIiP6Cph4U2uL0BhhMwWHlD4BIm+LephHQERPH7hifinO/EY X-Received: by 2002:a17:906:35da:b0:a59:9ed5:eefc with SMTP id a640c23a62f3a-a623e97b0b6mr230161666b.32.1716480339864; Thu, 23 May 2024 09:05:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716480339; cv=pass; d=google.com; s=arc-20160816; b=sNeZCNaB1F4Y0XROAohUuPsJFwpjKVtrc7nvQbO+5tLXcH4h7U88Fq3F0QvApYC5Of RtNdudBf8x/ywczzxJFKfcEpbC9oGp699lgSKkvaQHUVeOIkBE/rp6fe8TdlEas0iLOD rnJ6yZ89nwp5FmUQEJv/eFOk7LT7Dem/BTJV7ygXtIWZ3ffDfVdq3G2TX53U9L3M17WC jTLHEGfTypYkxY6LrKz7iCQn6u2SgFsI9UbLdl6w0yC2OLDTBi4xaY6YckfSAejgjDJy KDbnXDytM1Pq4gUABRHZsYhOpDJi0w4o/Lh/O+H862fFNxBorvhditiV6uB/gass6wSm LWVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hbJNV6u5M8s4qVdSqcES2YyHnW5U0tD32lx6+xYCxLo=; fh=GzCkp9dboMjnsRASvUnR8RkBPyyMxU6lLzxcgnbmqi0=; b=hOf45J845sSRvrtTWRS1nkJbsj057PYR8kqYknAx3r/TZeSPay4HxI9pnbtqn/VTga 15r2Z16aauoA6ac+LCAtfNjVpEwLFobhSwlDYz0IX4FQbf55bltqkXgFCiJDdLTNwLQx Ap5l5daAD2syKn5NgIAQeAp3uTfJTij7Rz/IVCMiLqeJbR3e6rwm3JHKD/W9Qs4yQrGf A9DgXvxXyj7N9/yiOeqCCpHr/2drCnp+GHt/4wIWHzGwlt1f1zWssPYNNPEp0N/rf5aS oWBW+wVvhP9rK7ZR+cEO6SWpq1xpW9phj1yetqBD8ERxzsIaHjuyiGXHaSmgBgt4vV+f 8VXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b="w3Q//oAL"; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-187768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187768-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba4ff7si1639753466b.582.2024.05.23.09.05.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:05:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b="w3Q//oAL"; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-187768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187768-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 97E6C1F22C32 for ; Thu, 23 May 2024 16:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B77201CAA4; Thu, 23 May 2024 16:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="w3Q//oAL" Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCA5E179AD; Thu, 23 May 2024 16:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716480321; cv=none; b=cRNKiGmuK8koXHiOwwErttnho2zRfrJ97ywXAGUfGtyLt8Tx8tbrgwDd9GVYscHb2ZTrWUWrVgbDGCqDZam8Ldy/6TKmKtc4XoCQQn7Og+NxYD3mo0VLDP1xjaLtrGT67d0bOYN181fZLeaAUJQ5qZ1Yf6STK8EhWpraXGUoK94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716480321; c=relaxed/simple; bh=GG5O6F5fwg3hjv086Pbkk7LC/OqlxCvBbLi0uEac3lI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=baG+eQBFOXnGms0FDICEQjGw3azPJVq2VKY4GNjEUTAe7LFsSJFD9J+rrqflyv7voLtzcV42Dbli9ebLWAr1KDOW0Beku5Zq0ecARIpmSXtziBTOOtlS1J0VWJo8Ef6/CxxukIJXEeLBmd+bI2kAzP9wxza5CRtxwwzamREXxF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=w3Q//oAL reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net 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 6.1.0) id 889969608d4a76c0; Thu, 23 May 2024 18:05:12 +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 cloudserver094114.home.pl (Postfix) with ESMTPSA id C952F6A4927; Thu, 23 May 2024 18:05:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1716480312; bh=GG5O6F5fwg3hjv086Pbkk7LC/OqlxCvBbLi0uEac3lI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=w3Q//oALK72cSANyB5siDE3t96MfpSnZt7foty0oCCimGyfIJN7Te6wqC6DRbAAj/ S8GgGDKxJFJW/dJAyY/sEiAZkj7wk9AfR7RBdg/mOT8EDN2LOqGPJPOrsKr4WAIKIU kWwg+TdhlJltqOoF4cMmAVZrdWSPFutx3DIdLyTikCA6j5Kh36y2hv3yo7K20GAvIs OYQtcCyKU2oZu9gpKoBEFvs1XIRLQ2bFHWS1lQtQwegW3PawpbokkSU8Du4QdQHEoh 3HZ4EWnkVe+ITpAqE5pdLDrCsZ88ilVnjyh6tTzZo1TLpsUn4MXxUk6PHfZNrreYPq sVr+johIRU04w== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , "Rafael J. Wysocki" , Lukasz Luba , Daniel Lezcano , Srinivas Pandruvada , Zhang Rui Subject: [PATCH v1 2/4] thermal/debugfs: Allow tze_seq_show() to print statistics for invalid trips Date: Thu, 23 May 2024 17:58:42 +0200 Message-ID: <2323389.ElGaqSPkdT@kreacher> In-Reply-To: <12438941.O9o76ZdvQC@kreacher> References: <12438941.O9o76ZdvQC@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiiedgleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopegurghnihgvlhdrlhgviigt rghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 From: Rafael J. Wysocki Commit a6258fde8de3 ("thermal/debugfs: Make tze_seq_show() skip invalid trips and trips with no stats") modified tze_seq_show() to skip invalid trips, but it overlooked the fact that a trip may become invalid during a mitigation eposide involving it, in which case its statistics should still be reported. For this reason, remove the invalid trip temperature check from the main loop in tze_seq_show(). The trips that have never been valid will still be skipped after this change because there are no statistics to report for them. Fixes: a6258fde8de3 ("thermal/debugfs: Make tze_seq_show() skip invalid trips and trips with no stats") Signed-off-by: Rafael J. Wysocki --- drivers/thermal/thermal_debugfs.c | 4 ---- 1 file changed, 4 deletions(-) Index: linux-pm/drivers/thermal/thermal_debugfs.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_debugfs.c +++ linux-pm/drivers/thermal/thermal_debugfs.c @@ -802,10 +802,6 @@ static int tze_seq_show(struct seq_file const struct thermal_trip *trip = &td->trip; struct trip_stats *trip_stats; - /* Skip invalid trips. */ - if (trip->temperature == THERMAL_TEMP_INVALID) - continue; - /* * There is no possible mitigation happening at the * critical trip point, so the stats will be always