Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp626815lqt; Thu, 6 Jun 2024 13:21:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeElDQWK1jXkF8Us5EC+B2QtcO17AYAcAxvziFZhs+9LlF4dauYKv0rS5bOpKRdJU0I0tG4IdUmaFbi3Dy8ZjVpsfWgugRlENROiI7WQ== X-Google-Smtp-Source: AGHT+IGguzpeBaKKqfhE/EXxwcZ+PvM8QSvkyzWBKGf5VHZaC65GuUMMCWUrGyQ+gheopIwNryac X-Received: by 2002:a50:c30f:0:b0:579:f1a3:664f with SMTP id 4fb4d7f45d1cf-57c50973029mr355074a12.30.1717705263870; Thu, 06 Jun 2024 13:21:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717705263; cv=pass; d=google.com; s=arc-20160816; b=bp1RjzItt51u8Uwyt53e6JRph5F1JJqi4CrkRcxzv7P4uS70DjxMKjz01c84+QdRY4 8tk8tpyOfCM9SRfUu9Dxa8/m4VXX78gU5Gb44ETy/8tshrwVXU8N1Vrs65uQkI7I5GxG xFQUfG3R+t2oTU/uMRbCE/zcJI1tRTNFsrtVRhSRjYxqX+yEw4BtVFnXt62b0sMHMvWK jMuLFVN8nJtaJwsKBNICNYpCjoWDEh7wSz4uOoq0vlHV4+fpmZp0VGvIWs5SU4xBOw79 vWISH3BiCiYWQiZKEYeGVjsZzJ6vuuoACoLxnSi/XnLELqpAYD6+A02qKgUqZddMeQgJ PFTg== 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:dkim-signature; bh=83UooEInBqzhI2DlCSt/csP7JuwUOhdJysD+ewzTrGo=; fh=GlexA1WErMhNZnj31cxa3mcvw7ccLCFyYWM5qqiS1MY=; b=0IfMw+HAWQws0jmZ4U2pqJH45pAWRykzhO9fiuWzNbdbszOZqZS/0kjQ25HT/m5UrT HvO/mEpGuQOfRZYHUAHlPi0ip4PiifhJM+w1vIdCoGy8uN/AkovBgGMi9HBGpnNqKOmK r6nFL9iIzCL+Nr+QIbgMWcPTJJ79ONS/oTgMfCtYZITBVz7K/U3dR8tkbHxg/o00WBxI ArVhgg0I/5eG2xRVGxPnN8t0AimKuZcCSNdJcOtnhtZEtlt9Kpl/iG0Rmpl7wuCT4enA 4r9m85I7iFaWPpX1KeA4LxrB7AOjAR3nfcoEM8WwpMkyl7NiQMW500tWXJvkpygGua1e rO9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VPY3czMJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae233097si1067393a12.457.2024.06.06.13.21.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 13:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VPY3czMJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 935D21F231C2 for ; Thu, 6 Jun 2024 20:21:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4DAB74BF2; Thu, 6 Jun 2024 20:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VPY3czMJ" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D46571748 for ; Thu, 6 Jun 2024 20:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717705257; cv=none; b=nD6Im/A+nCgo9GBUrT411lUsc1kONB//NZpPYBr6/tFzi+Hz8zFpTl68TqObo4jHTvezCwXP0ITkEjy0VKSsD0Tf98iEdL2M6i9dyumCFDTcP5zhkcuecg/Rc//NC6gntTGu3JF2Iq9JNrXlV2tEkAEOcaE8AjWbj60qIYxfaMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717705257; c=relaxed/simple; bh=ZhN5psr88O1rTZYnaj0Pp6eojbRqBJN+Mq+LrsdNdOI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eUk/uxueprWdkny31CErw2UbdOCPTdAKNbn/N7NL8aCU4zfX/Bvjlx/dGUVMIRdCd09/Jm1n0brtjQ/VV50uk0wPX0ty+ZbMgyCw61EVMBKkhio0VC8MZs0LdEH17P566yBs42UuPYDSWXJ13n7eT3+I5dbDxy3VEgN8HWCKj/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VPY3czMJ; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52b87e8ba1eso2015384e87.3 for ; Thu, 06 Jun 2024 13:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717705253; x=1718310053; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=83UooEInBqzhI2DlCSt/csP7JuwUOhdJysD+ewzTrGo=; b=VPY3czMJ3YejXbhqCZ9aBdOLp6TvNZcxgEm59A0kdPfyU46Jc2JGICqxrFhqjmcWC0 G5smW9rvX8Tc4sv89t4ZZ3LKMdYltI9p9AOFpVxPWeJkTxczd189ZFZXnHATg4StWRIE 8i92JcUnhdWMchcVvHPFEW0i74qtynEelcagmJKlCf9ng2ruI4F6kqvQoTlHagU3qBsl VLCeFwV6TGNYAfuMjyfvIC4Wi2mEu55hczNFF1KIgFYm9oWF9WMsro3qaiCQEYfwOAeT G9wL6+NM+yk5pVKgxBRuuLmqU3SI7TonNHbSuJhOgRuOVSpGh4jxNNJthwmxECt9dIFO LegQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717705253; x=1718310053; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=83UooEInBqzhI2DlCSt/csP7JuwUOhdJysD+ewzTrGo=; b=kxiFuyqHPhpCCiFVt2w8nePrWdT0sjIJ3qUxwtJAfExBCXR8Ec+5WzMgByARCQnmXp wXUQId+oixpK9NAVmHQ4EUNFT478rbZZGVIjxYnFeBeGTq/Dg7INML2HpjFuGiedviYc 9LAkemUW+Qq7xAu5QTYXbFDYuzHuFVAxsIP0myQeF4g55OI+LwVAVAye3tqpsw39faCR jWLVht4xLccQjqNskPo8clQYKDfIXGqh5KuRIaisDiD3myg5Gx49RLtvtTiJEfbgPOPU hjH2X4xsASMmD4yZxM3utN3j0APWz35+QSK7JRe6uAhUnrzQ+FtLstyHqpE8+bO5YOwF sgWg== X-Forwarded-Encrypted: i=1; AJvYcCUI3xvcDgYGXsSMaz+Pv9pGp14hbEDmgNHMinvW0c3LuWA2v6VjWSIlbZ81YuZyGW15H7nJrCQ3inCsDQWHETn214VBo9kVxSPheE69 X-Gm-Message-State: AOJu0Yw/7GXeCIy+X7FzPeH74hu+Gsl8Tc9HuMUhcnRRvpJB5UrGJmtL lnTPmeQ6BnJbnmYih1NaPzwl5IBNGkAyea5y3ainjJhR6kS+XDSj22jnzecAZQA= X-Received: by 2002:a05:6512:3e01:b0:520:ed4e:2203 with SMTP id 2adb3069b0e04-52bb9f64915mr689722e87.8.1717705253100; Thu, 06 Jun 2024 13:20:53 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:f9a9:3740:b905:9995? ([2a05:6e02:1041:c10:f9a9:3740:b905:9995]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4214a4aab93sm70618805e9.0.2024.06.06.13.20.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 13:20:52 -0700 (PDT) Message-ID: <710ce159-728b-4dec-854c-bbfd6b4bf6bf@linaro.org> Date: Thu, 6 Jun 2024 22:20:51 +0200 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 v3] thermal: core: Do not fail cdev registration because of invalid initial state To: "Rafael J. Wysocki" , Linux PM , Laura Nao Cc: Linux ACPI , LKML , Lukasz Luba , Srinivas Pandruvada , Zhang Rui References: <12456961.O9o76ZdvQC@kreacher> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <12456961.O9o76ZdvQC@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 06/06/2024 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 > --- Acked-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog