Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp469515lqt; Thu, 6 Jun 2024 08:46:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUsw+Jx+KRVpVKYaG9oZT6LMfVibx4K5t2VY1628cGjRMlhwooPSChqIHdF3la/FN7RUsSqq0eok14BiV5VeIwFk/iMcT3LTaoTQ8q1UA== X-Google-Smtp-Source: AGHT+IE3LSQ4KZV1f3EO4Nqtzav/IkW2RCQ4po883eE2/4hNHLdRwlSLQHTC1GHEo5XRGeIJLEny X-Received: by 2002:a05:6808:159c:b0:3d1:ff8e:a5b6 with SMTP id 5614622812f47-3d20429b46fmr6781751b6e.15.1717688804084; Thu, 06 Jun 2024 08:46:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717688804; cv=pass; d=google.com; s=arc-20160816; b=PiLqxYQVnC1PodNUiNtHSzrg0mQXrkiPzP+B3mKb1ZZCUR9FNfvCfG9HMVvYsQ8Kj6 iOpSTgnajGbmRQcVjT4pkGdPhXjUiF0QTcJauCVh3Gm8OtB93YC1v5mFY2COzsgRHOL4 RYZi2T4/Q+MhW8WzP2PkndN+Qb99dYOXcLjtGDlt/QInyQy5BF+4aRKS/COBY9WT+d1a 15XbupePTtZj85+YJfEgRwVHsdbDOT34SpoOkPJ03Umw91ZLll/k1SCN/LczRlbgk12c uP8EGMujt59E45/wx7CSXCact7HywNTDyqBJ2tdvk4o7E/Rmbqtz0UftApjSEcliDS1s KQEA== 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=3jZaZJv5zlvCixCJOj9oO9rxv5ZgEpgWsT6U+ox/0gg=; fh=AmEILut66TgoJQORfDvDCT8Er4gEuryvAGuiRCTuJ4o=; b=Z7kEWNGu7MGdB2Nj7P2DZsMfdGgxljSfEn9uO+Pa+k0DeBj6Zb0eHqCKAupyUyqgYE Y7i6xpRzvSMLraGfyomkDCYmLhtxWdN+6+8+wS0OgNJ/ZNlIZ/pbSohrrH//0iCgHeJF MHcdYgCBa0gjPGVMSGA7Io3JtUqwsKsvKA0jDjm3viHpAP+OQfpZCTAQ/CeEgdBp58AL zhFs78/56lCiGL/gADzjNfwMnvZKPzt0BKKKoV9UTJ/qjKf4GBzEdygI77zo0o7pVgOM Qbcz0N67c7azELpx78zPEFunpv22iga7j2Q4Jkn+MpkuXvDWC/e08yoEYSlrakpQK6Mo DCPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v5Ct1XvM; 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-204600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7953adfda5asi8844985a.302.2024.06.06.08.46.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 08:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v5Ct1XvM; 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-204600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204600-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C566F1C2208D for ; Thu, 6 Jun 2024 15:46:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCE15197A75; Thu, 6 Jun 2024 15:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="v5Ct1XvM" Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 735FF19750F for ; Thu, 6 Jun 2024 15:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717688790; cv=none; b=Zb8n3bfEwDfwT8FvJ2VMSlP51fIJgXCMwn0qeW/tPedh7kFRdchxUith444WaFApkY/We1Q3LeJJv6/5MKgrwDFdiPMZoAzij+c8zeCWdAhp1rJqXSk/fUWIb27P7mI+IpJpku4bGGYXlXSlOQrlvkBeZrU4lHBMpgbSPlSplQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717688790; c=relaxed/simple; bh=1iRA7zO8aKW7XL2XJgg+W5/y8qAK8Pw9ucLgJU3LjAE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZMh8dh/3vuGNjMDyACBryd/oNcIERC9xWIkkFVEE9hPwD6kDcNdt/HbagyLBrq128soqZwPZrkbNsQx5DrpOLtao9ayqhJzzx1eIkrjTyBFAFXZv4DSjSQET+Z4If5JYN+UutH4wV9tpOvUmL+VFbzwYm5Jmk2vhuZ4G4Jbtj08= 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=v5Ct1XvM; arc=none smtp.client-ip=209.85.208.181 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-lj1-f181.google.com with SMTP id 38308e7fff4ca-2eaae2a6dc1so22212981fa.0 for ; Thu, 06 Jun 2024 08:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717688787; x=1718293587; 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=3jZaZJv5zlvCixCJOj9oO9rxv5ZgEpgWsT6U+ox/0gg=; b=v5Ct1XvMTXDuhBMQGBK9XFcLDVgVQYjLNpXmYIzsamIWgIaAtaZ248t5ebZ009ho5i 5pbx/FuZprwH7mcIQt+4nAL+yq14aetBqkJng6h7bcSSGoq6kExVpyvoEVlxd3PtEArO 4L1BZRWUhZEA28On4SoQ4EV8BEVcpD4KBG4cHRQhLR0h8sCTZIkK8RYQ2QFpjASxaQwP ccZ4jlCo8hnOaxO8ESTafczECW6qlanHHYrOSsZr9EYt6s3OeAf3YVve1fQbjLdzKYu7 qMHbQSyENBSc/yHyG+Ue0wIRjC0TSDQb7btOZc6qJTzCZhTuKhO/Di3hhhFXd1cFcFcZ Yggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717688787; x=1718293587; 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=3jZaZJv5zlvCixCJOj9oO9rxv5ZgEpgWsT6U+ox/0gg=; b=WKI6IkPVyx05GYwVXlLcYFHbiH7x0JfQdoM7zMinEabawk4Qc5upkGDylX6+ptwY07 K6haEIJm0cmBHIUkS02mpElLsqo7iyzjMcDxoAsqszLuZKnra8MUeY+sycIFpdPsiNXM MH+7qqrZYROSuyXG7cq1g5fH/Ukfr986p32ifP1sr8ozMxykTXok0uWlYq8j1mEAbsWC SJyCzUrtr8MhmBIxtc8ccei7OdHII0P48C8hBXrWdYwECYNU6Y2kwQlR0pyuv4UXS1cw KqLf4zsnZKNo9jjs/4tG4pDGfzYyLiqCzpAkLIBF9HdcUSaywnKtWdEjj3IcYpY4WwBn P73Q== X-Forwarded-Encrypted: i=1; AJvYcCUXywNkPLBMemmfJj9Be5TrrEmUt3QIxh/aWMAuc8ER5WdPcWMN+Qx5UWwfjlhuxqDsqFdRe9pNTJzzQGatoCeOvmYeTC+bg5kaKoug X-Gm-Message-State: AOJu0Yz0Df3SsCSCWuR6SnbFCXSHmWqgL+w17uTK2x+9uuMBU7YndSYK 74hTqlmQVuR8+yyLCPx6xqZWPA05KSoQdF0t+jxI2Y2ImVaKjFy+oEYmg/96AbE= X-Received: by 2002:a2e:bc1f:0:b0:2e0:5d7:a3a6 with SMTP id 38308e7fff4ca-2eadce281bbmr969981fa.9.1717688786585; Thu, 06 Jun 2024 08:46:26 -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-421581020d2sm59821695e9.11.2024.06.06.08.46.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 08:46:26 -0700 (PDT) Message-ID: <3ab5357f-9577-4985-b09e-b686e66b7b5e@linaro.org> Date: Thu, 6 Jun 2024 17:46:25 +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 v1] thermal: core: Do not fail cdev registration because of invalid initial state To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , Linux ACPI , LKML , Lukasz Luba , Srinivas Pandruvada , Zhang Rui , Laura Nao References: <4569763.LvFx2qVVIh@kreacher> <5f93f034-f781-47e0-b8ce-3c8407a709f7@linaro.org> <90a9df3e-153f-4972-8086-13c21a574763@linaro.org> Content-Language: en-US From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 06/06/2024 17:15, Rafael J. Wysocki wrote: [ ... ] > OK, so arguably the driver could set the initial state of the cooling > device to 0. That may or may not be the right thing to do depending > on the thermal state of the system at the moment. Then it would need > to wait for the governor to pick up a more suitable state for it or > leave it at 0. This could address the particular case at hand. > > However, should the core fail the cooling device registration if it > gets an error from .get_cur_state() to start with? It didn't do that > before. Indeed, it didn't even call .get_cur_state() then in the > first place. Moreover, the current state of the cooling device is not > even needed to register it except for the initialization of the debug > code for that cooling device, so why fail the registration of it? Indeed, the simpler way would be to not register the debugfs if we can't get the initial cooling device state, with a message, so the driver responsible of that will appear and hopefully encourage someone to fix it. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog