Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp997731lqd; Thu, 25 Apr 2024 03:04:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9yeWXqpgRHhpPJJhx6ijHg0IeN4cDgXBgwXYiaQkLOdRkzJjA/pOYflEexg3YDgkxnvqltaPu2VEQx5zjGD+ePSHAWL2VY3MznrGOcA== X-Google-Smtp-Source: AGHT+IEjCTg21xQ4EugB2jK4PUo5LPYGglpZFLPC3OSDZhGri13KT+7uNC4Xe5ni14hxOJcpaTJX X-Received: by 2002:a05:6a00:178e:b0:6ee:1b6e:662a with SMTP id s14-20020a056a00178e00b006ee1b6e662amr6941676pfg.32.1714039464867; Thu, 25 Apr 2024 03:04:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714039464; cv=pass; d=google.com; s=arc-20160816; b=jAkY+GpHbg6xNMD135wivWo9rqNRZd477BONxN7ls1S7X0Y3ee0gdT/3DbYQlv8RJ9 dxAQzng38XkUljTcvun4N+kZwgHTdgAPNZ+yGSC0na9O39HaeKhYSBeOBRxq2gTobvd0 cEAo7GPCDLim1dhdrMmxV9EKfP/xu1ILvdUpgez3joMuuXXTbpGXWGSCVaClfkBJydJ6 jei13hF7RmdbA37XZZji6FmohpXsTmTlrUn/g/fCbFqSS47ufzLj8t6qfaWnqxZQCyzl hIqiAnYM44v8jqU0yO91qi2ZdIcgsCMa9iJnJmePiqmnB2czhBPAYh29A/kgzu/gwXLY Ym6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=ewuSjPsQ2+2hY12lCKJkbC2s1BqbH/lhg7mOMXxmQGw=; fh=wOhU+RfGR6AETSQpmLn4c4kjE8Q9JmYwekkxN+5ihyo=; b=Nb7ap0kxvpB/8zl+DD6ywvAD3egGm5OB/BxO5jlShDR4CAMWGHmJVFGgswSgsp2m94 ODZ9puKPFrap+IxSUDUN2Epc1lBgeRFsi5mMBe56wAGOtYHWheuKieIMVF7y15LnYutM HWO0ZxYuhwY9uxQClHKRT6IuZIREenrQ4nb8/uEpbt4+bR7v1CjDvWw8DMIZE9MfBV38 rD+KP4W1gdxTGlug3kdEtP8fzRpfCTdhm2GtlyGT4HKwcOa9IzQS5zR2Lr5KevHWJbxp zNvOGGqGcGelRIZamuEkejFbkKTCoPMz3NeP/s66SNpKFFZPLd6H7pv7a9mlyQAYbapD eP3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-158347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a11-20020a056a000c8b00b006f0b4f9e5cfsi11664133pfv.124.2024.04.25.03.04.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 03:04:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-158347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C43CA285050 for ; Thu, 25 Apr 2024 10:02:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D632A86243; Thu, 25 Apr 2024 10:02:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30B1A85937; Thu, 25 Apr 2024 10:02:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714039370; cv=none; b=BMap8+O7uPz7AS5uW0TaO7N72b5VoRP7S4uGXYBhUAmMVqP95HEkchA0v+r7ln+9OP1VLYYZFiNgDgJG/gf4XFZ7VtisVgtQrda9DqzuADx34C6QDIuAUI7sVcGLQAuJFQE84hXVeG3+qS3icWhp1TkP9D+9bmIT1s7CP9zz3+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714039370; c=relaxed/simple; bh=bc9Wcx0YrqoGT173loLL71by9HSXOJAyO9bDyHK3DMw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Auuiy5eHTdP7hFvLZOTuDRuW4fGEHB1ouZc2XjfQsVVts5rHsNxQGAqtjZy88dsGtYTlxKBawwYjMrPFcNOiClP/4obLtAl7sphHZ2eniNh4M0l2JPZVnpgCWbvyaleDm50VkDtqh1Sr+Bd6fR79LytjJyie8SoYB/HDNM1cdro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A4D7D1007; Thu, 25 Apr 2024 03:03:15 -0700 (PDT) Received: from [10.57.74.218] (unknown [10.57.74.218]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A80523F64C; Thu, 25 Apr 2024 03:02:46 -0700 (PDT) Message-ID: Date: Thu, 25 Apr 2024 11:02:44 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/3] thermal/debugfs: Pass cooling device state to thermal_debug_cdev_add() To: "Rafael J. Wysocki" Cc: LKML , Linux PM , "Rafael J. Wysocki" , Daniel Lezcano References: <5774279.DvuYhMxLoT@kreacher> <2181352.irdbgypaU6@kreacher> Content-Language: en-US From: Lukasz Luba In-Reply-To: <2181352.irdbgypaU6@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Rafael, On 4/23/24 19:00, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If cdev_dt_seq_show() runs before the first state transition of a cooling > device, it will not print any state residency information for it, even > though it might be reasonably expected to print residency information for > the initial state of the cooling device. > > For this reason, rearrange the code to get the initial state of a cooling > device at the registration time and pass it to thermal_debug_cdev_add(), > so that the latter can create a duration record for that state which will > allow cdev_dt_seq_show() to print its residency information. > > Fixes: 755113d76786 ("thermal/debugfs: Add thermal cooling device debugfs information") > Reported-by: Lukasz Luba > Signed-off-by: Rafael J. Wysocki > --- > drivers/thermal/thermal_core.c | 9 +++++++-- > drivers/thermal/thermal_debugfs.c | 12 ++++++++++-- > drivers/thermal/thermal_debugfs.h | 4 ++-- > 3 files changed, 19 insertions(+), 6 deletions(-) > I'm trying to test it on my board and do the review, but faced issue. For some reason I couldn't apply that patch on the latest bleeding-edge branch. Could you help me in this please? Is there something missing in the patch set (like one more fist patch)? Regards, Lukasz