From mboxrd@z Thu Jan 1 00:00:00 1970 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-pm@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