Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp473304lqt; Thu, 6 Jun 2024 08:53:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhdU9YfEqexHfWt72fV7EWU90MlfICb0/Lfp65/7TNwS6lPNtbbHeWj1xrNGPdzOCCwCbEmq0odwX7Md5mGsPsZ2KlvSIXVNNla7Se2g== X-Google-Smtp-Source: AGHT+IF7fUJXSeOJVKyTFkOas5l4AXdhWuyYbDXgmFH7vXSuQFHhGnF4t2c4t5caKdjmuD5kABJq X-Received: by 2002:a05:6512:2f1:b0:52b:798f:cd7e with SMTP id 2adb3069b0e04-52bb9f62696mr29798e87.12.1717689205925; Thu, 06 Jun 2024 08:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717689205; cv=pass; d=google.com; s=arc-20160816; b=kpG9iWvOatJYon3A8iQDc1dyMAjT7FtZNK2Jt3Mgoo3Emvo9TsKJMvITz7IIVyMWsE 2nwYdglfRTn4ZDIm5y+S4jDkeL9doNJI4+FWUlMeZbe+MZvxhccxLp9GtZ1qmmKdA9Zh 1vg1QW2D1qZrH6mjd4No0HQ11EZmRuoZLXQTlZI+o07T2KvAOfd/qBPrYAptQ5590DDO faNca9otYMq5BaNX7h1foMRxfFP/rjPl7UhOCtUfyw1omNUaCLn+2Twuz53FO7kzffWQ RVR15nst1uVeWROrA80ng4mPzGFdvGNUAlfYDF2I3sDClxrg+2Ge5eC+iQyohsXdxiE5 3+/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=aRDEitcjVXOj5S8C36JFXJcVwHmjhsvItK9hGO0QRwk=; fh=HKuEUz8IciHkU/L4kbIZ1eBb2pAZlWFTHNblLcY0WOs=; b=0ck7pvwoRVvKrMQvpe9V1pXtM78CeNwNXnTH9ef4nwkGujkYIYCCH6bJNPV3nHceZ0 bQFPDVCqaFax6eyg7rkU4R+33UUHI/1jYVsfg32K/fqHSdrM1ftbEmjIm5JCA/zenGf3 A1ngpZWNSAJeMqYw8tvGYVyLupSM9s3qWqyV23ExZ6WAY3couUKbRLBYLitBA2NxkpMp 5urB9LYaRv32Ch7D1BT5ICVYbgT1Wz8NMFu0sLNsQDoPRMbP9A+X/rQUdEub4SWqIEUx HMjR0XPdSTrad5BuJXxhloKn4Po50RSqho7f4H1Q4W44pA+gyjb2qc3X8zfYPZl0ytgR DHiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d6iKZoLG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c807492ccsi79390366b.918.2024.06.06.08.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 08:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d6iKZoLG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 7B5671F223A0 for ; Thu, 6 Jun 2024 15:52:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7AD9197A99; Thu, 6 Jun 2024 15:52:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d6iKZoLG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 012A4197A6A; Thu, 6 Jun 2024 15:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717689145; cv=none; b=DpT+tdraZ07tBvqeMqDHOIa3+ij5exnuycOtY+ODEUbNyqtg2xD02hLxRIB0lV3zF/s5TPxTW6SnsUI5ox46HPZyQR2OAroJ/Yfrah9XOQsByBSE1nuDDLQw7Wv/35ajSMPhADpLYN6EjVOddJJiFBw2QOzzg/xRDR+qRvKqqg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717689145; c=relaxed/simple; bh=B0gzbgaSuheVLjZ6z4399Ms0LLsT13io/dXJxMyevAk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VdblO1m23sOmAKB+X0Own9KDAlox1c/VlFhLT++75J340iZAYlrBqkMtZcQdYYfjLe3bMeeh459p3BjUeW3V23e4LgnqtPNgDTqXeeIu0GRxbIvHFvVoWHgKYmiQWYQZ/A11yfv3slwoTF+dVVD1yxXmUw/x927BiiegxOKsZpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d6iKZoLG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96BEBC32781; Thu, 6 Jun 2024 15:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717689144; bh=B0gzbgaSuheVLjZ6z4399Ms0LLsT13io/dXJxMyevAk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=d6iKZoLG5xjosNXqnWzoSwauFUTMjtMSXhhgGZjA8jdFUFfklAPPOhyM/LJ5Uca9k g2hss8xqi82tdL2dkhW5L7d8Ho35qQ7hr8ItVvNxTrgsaxjbd650i30WPgUQzI90L5 h7LzUs24WA5p3Tz03q0XaGPQP3xtUZdZyzsFSjciujXT5aZCNZQsdjiqR135tBqu5T iNaQeJrzkv9UCtZOKGNGQLdYsqiGINPcC9QsTHQ3Ts0Ykl1oWgmis0JpFZNpy5BcuI F0i9JyM/UtYvctlZvXeHxSwytg9gpT+0UtoVOau1AZekZAF/XUivmqgSQrfLhsbm1r M4pge7r4vTOwA== Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5ba77a212adso45521eaf.3; Thu, 06 Jun 2024 08:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWdIUOHvyP6Eq8RjYd+9+B8LjJZuhGikDh0uCHzH4vUDqfcr9itFOgWCwK22TMoNiCUwi+tWOeFeoaNgJp2O9/QIZGuVpDSEhtVtEICGXd9A4q5ooI2li71RuU7CRzBUwIB+MrtXkR9j1k+p+whcyqTmpAjS6odvFA1aqIFOcBg31s+ X-Gm-Message-State: AOJu0YzLwdiOlBVY4n9w0H8h6l1R8Zbh1rGBekkgEI1kcdAo7gb7/+9q zDBwsuNi8I38sKZs6ZW+EvUv37+dqJ5aJGiiMSX2OBKVe1QZozhjzQ2FxkxdN//ReH2enqZHDTj jv0chNnHkc2ZU1FaX/1d3TnZbEaU= X-Received: by 2002:a4a:3442:0:b0:5b2:8017:fb68 with SMTP id 006d021491bc7-5ba78d3b4c3mr6253102eaf.0.1717689143933; Thu, 06 Jun 2024 08:52:23 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <4569763.LvFx2qVVIh@kreacher> <5f93f034-f781-47e0-b8ce-3c8407a709f7@linaro.org> <90a9df3e-153f-4972-8086-13c21a574763@linaro.org> <3ab5357f-9577-4985-b09e-b686e66b7b5e@linaro.org> In-Reply-To: <3ab5357f-9577-4985-b09e-b686e66b7b5e@linaro.org> From: "Rafael J. Wysocki" Date: Thu, 6 Jun 2024 17:52:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] thermal: core: Do not fail cdev registration because of invalid initial state To: Daniel Lezcano Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , Linux ACPI , LKML , Lukasz Luba , Srinivas Pandruvada , Zhang Rui , Laura Nao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 6, 2024 at 5:46=E2=80=AFPM Daniel Lezcano wrote: > > 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= . OK, that can be done.