Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp891160lqt; Fri, 7 Jun 2024 01:32:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0MUNebRuvJ/nu1PyslPGCuaw9eljTb8X43EAglyNIbMyz3q579NQn6gt0pDsNUmVYtw+gbroSqSGfT0Srzoetq2Tqgg4IFOL07vyVMQ== X-Google-Smtp-Source: AGHT+IELuaJx/hHKv2AnmXdJN8OXHBFycnp/SmYPOCTlDleY0zPiEAZpS0vouO8iN/8FLfVfTk/i X-Received: by 2002:a17:902:654e:b0:1f6:1a86:37e6 with SMTP id d9443c01a7336-1f6d02e0993mr21831295ad.23.1717749144882; Fri, 07 Jun 2024 01:32:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717749144; cv=pass; d=google.com; s=arc-20160816; b=xv4qZoN2pSUY8nlSlODCCtFvy9EzcH/omugSd+ry1OvDrWLUgnYYV1m+oI5RD4ZCGp E0wsl6Y5MDfXKetT86wlxT8c+yRQUTi/6SCGDYfRI40lMvQjV/xs8eCYV4QTn1Ce8a+B 3dwCmOZMh3UCOBIynZBTkK19oMfdc7Wogc3tkOlpPiz0RbLJgz9q2FfgbGct2dYu5pzt rgm2tpihhC1s8CvdD3k5W2r/SWDgKQyQ/8Oy0BnYMr315n2xCl52oSpy0LupfdZazkCm qg79jhcpls4TQrUdrEMAv9/JwVQ9WW5VGZiqsjcs8Juy0CaItUVviiKHcwaZN29ca2Ur 7ZiQ== 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=Dj6POdpIVex7yoPYU/aYAto5w4841Hv3m2q33vPNiyE=; fh=FLJxi7MbuQHm/M9LteH3pkELyGK6q5IlnETEMm1LLsM=; b=zzBxKDbvBLiYtI9yeTc3eOyS8LHYRkGFtOBN997f4A3Q4wyx75UJcBm8/n2+1lA6hr RFfDcTbXQQSCa1Nh5B+upB0AGcOkNVEteNGttnVh1i1YWtCyTAcMU7tN9KXwIbhwdnb6 XZmsCWcwitWYaFio1y4qIbKHGv7KgzhkY79nZEXxSXq+23UsV29tiwVddavYUxGfQNbV EkFdmopC1IxoN6aNbI9SUxI2qEKs1Euihy6f9ECoj6Ee6fQLcMdf75Tr/RTmBo+tJTSq kxgqGYgOCIrXh6CdL7ENHhQ4SLL9zp0v7adsPJxdbkOk3ZcleKGkBIk+ctxTok9x46k7 /oLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kMYgB91W; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-205606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 d9443c01a7336-1f6bd76d6bdsi17364645ad.177.2024.06.07.01.32.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 01:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205606-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; dkim=pass header.i=@collabora.com header.s=mail header.b=kMYgB91W; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-205606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 08BC72832F3 for ; Fri, 7 Jun 2024 08:32:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D77BD15B112; Fri, 7 Jun 2024 08:32:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="kMYgB91W" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 784262208E; Fri, 7 Jun 2024 08:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717749137; cv=none; b=D1pqlCBJH26rZKmgb0829IAGxTxwtE/jCNbz6vcKzfvj74dpCg/ToJl0n9/6tG9L+7fb1FO2M5cDHA2lD9sCIDBGXTTqz42oR+FPAm7aXmM0OAkyX3ho3wWYgvICBMpHNHG/n5Jehc+TAvHDPhwahcDTazegvVfN7sE0uvWVIvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717749137; c=relaxed/simple; bh=A+DkgWFqywsQJPc6O6LIH/uEqKwNeM/Fe7AFbx+bek0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Zo9TvfgQiSaHOIz56w8aMKcQ7gt/Sq/lGEvHk8tOeHktYX3LGzTVCJRxZizBH5mbQ44vYjpGnW4kzme/+DoHu4mSpl3ueoAhR3Q+qFvV76ACjtNk036Fv0rFCK7Pgm6jlmKwUrYuCsES+4dP8id4UicTk+LAFflzwMkbe4H9TJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=kMYgB91W; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717749133; bh=A+DkgWFqywsQJPc6O6LIH/uEqKwNeM/Fe7AFbx+bek0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kMYgB91W3a1jFCe2NJEZ1tl56GB4B9eujeR3L3NE0vF2c6Db54DPB8yrU4knUUa+q iIty6khh0Br6sjJ4OOOnpuzHuI57geuvFdxkE0mArnAw8PZZwmui5dQ9QjIzP2x6gj aXVvkozB7G2diJc21MzAmlMpD0RbCFPI6TSeOXZpYK7U9cpQv9IXmHbmrksRR4py87 qEYJvHO/bHHIAeO5pYPuKTSNNGtCPFxwAurDTMZlLtiwQZpMgEYqu2wsJfVW9xYE2K CTvbX9QBmy9Fy61i7KrZHWBl8RlVBO0dFjulVrYdQtK9eZv3LfH9+aEE4IXcL02tjW Sv6T09U17Y8RQ== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laura.nao) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C27693781022; Fri, 7 Jun 2024 08:32:12 +0000 (UTC) From: Laura Nao To: rjw@rjwysocki.net Cc: daniel.lezcano@linaro.org, laura.nao@collabora.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, lukasz.luba@arm.com, rui.zhang@intel.com, srinivas.pandruvada@linux.intel.com Subject: Re: [PATCH v3] thermal: core: Do not fail cdev registration Date: Fri, 7 Jun 2024 10:32:40 +0200 Message-Id: <20240607083240.115295-1-laura.nao@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <12456961.O9o76ZdvQC@kreacher> References: <12456961.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: 8bit On 6/6/24 20:14, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH v3] thermal: core: Do not fail cdev registration > because of invalid initial state > > It is reported that commit 31a0fa0019b0 ("thermal/debugfs: Pass > cooling > device state to thermal_debug_cdev_add()") causes the ACPI fan driver > to fail probing on some systems which turns out to be due to the _FST > control method returning an invalid value until _FSL is first > evaluated > for the given fan. If this happens, the .get_cur_state() cooling > device > callback returns an error and __thermal_cooling_device_register() > fails > as uses that callback after commit 31a0fa0019b0. > > Arguably, _FST should not return an invalid value even if it is > evaluated before _FSL, so this may be regarded as a platform firmware > issue, but at the same time it is not a good enough reason for failing > the cooling device registration where the initial cooling device state > is only needed to initialize a thermal debug facility. > > Accordingly, modify __thermal_cooling_device_register() to avoid > calling thermal_debug_cdev_add() instead of returning an error if the > initial .get_cur_state() callback invocation fails. > > Fixes: 31a0fa0019b0 ("thermal/debugfs: Pass cooling device state to > thermal_debug_cdev_add()") > Closes: > https://lore.kernel.org/linux-acpi/20240530153727.843378-1-laura.nao@collabora.com > Reported-by: Laura Nao > Signed-off-by: Rafael J. Wysocki > --- Tested-by: Laura Nao Thanks, Laura