Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2752428lqz; Wed, 3 Apr 2024 07:41:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrE/eGJQDQniW9YgL8Itlxxlvw74eDFLUgHnVvAuge/i8GZQzVsQ1RSx+Rv7jroDPwk24JOsqxnnq5PubgO/G80AiEPLTakfLAaMlKSA== X-Google-Smtp-Source: AGHT+IE78WzM74PZ7uM5lyl/aZ+rK54PdXPjDeRHPk7AfQMC9POFtzV7OgaLq5b+4QbtbktKwbE7 X-Received: by 2002:a05:6512:48c9:b0:513:cae8:4409 with SMTP id er9-20020a05651248c900b00513cae84409mr10327696lfb.7.1712155295633; Wed, 03 Apr 2024 07:41:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712155295; cv=pass; d=google.com; s=arc-20160816; b=WBLgi2N7drDYcI955zl3hgNovcKYQiOLTAZXqOQ6MbdB0Ct0hBsN2gnSVvZKO8GL7g i2m3in8UvtPmAFV9YbH4rljFTcc8wEdQUig25sz0goSK5TFKQWzEnp9eIptDXczwwU1C dCt71UwaZBqk/H/AADdqKNnc6Y0gBy/oj9z+Rj1fowmtG8jIlMM0bLwW6eVPhmvJUmDQ jzaraHyML3cmluB8tyN1VAmxTVpB2zwHWMErIlWmmlCd9pGMF3CJ9ECW9YM4veduk6GG ikTljQw4VkDSmcnWBqlATmT2Ud7SkVy1qQKqzzSBgla6ccAaxM2KDb5CMRh3OU1xYZ2v ZBxg== 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=khMSx0zJaNATOg9on6QF6MIy4gQLBoMOH2tILEBOQcQ=; fh=RLyeCvSII4OqiuWiw0l0fSY+UBArslf/3GGHN9Vv3Hg=; b=btCoTP0HUPCAj923O8PbGdJnUI1nIGZVZHH/lwPCmEexvv7z0U6JOzq/xORTXvhU2a QXAEqs0xVKb0QuIQPnE+5VrfkYAMV9Vgs2Xd/JFPNprumVSFPKnigpIwiaefTmdtyakO AEOGQ5b7cNzPMMFGs9uyXs13kCoTPWhPP1imAjSkTSXdg268pRN5cMGUDtnjr6Dfv6Ku WWSsGGuGnTMr/beJKXuGQscErc+LqlDCy3XMPP62TVjRMD/RCHkKmDXQNrpDATP4RTM9 y0hKkcXnFr1XwxThfPPMPhugXAi9jBZNYJ+VJQ1l58AVMjxPkmo3QEFFDj+64VQM3zdT RY5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TvwnX9H0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129985-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129985-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r23-20020a50d697000000b0056e07cc31ffsi677095edi.397.2024.04.03.07.41.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 07:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129985-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=@kernel.org header.s=k20201202 header.b=TvwnX9H0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129985-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129985-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 182771F266A2 for ; Wed, 3 Apr 2024 14:41:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F8D713A272; Wed, 3 Apr 2024 14:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TvwnX9H0" 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 33F7A3EA73; Wed, 3 Apr 2024 14:41:20 +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=1712155281; cv=none; b=SGMf+UCSMD7sPYydrjeSkdNIwIAb69Knx/T9PzwmX4vuv2/doV0FccvfPK70q+yp4ibxM6AjBzqHa1TCIZA1mVitQb0cwF49c3Y8C0j5UNxgARuE8OmxvRs0q62Hj4ILbRrWRFqmpc38rc9zglVbuWUEvjvoEaG36CpBgpc6B3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155281; c=relaxed/simple; bh=AApG/seUAig56ASAD5cr6mRzB8zJFOi+bmt9vVhtVIE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=seEJHHu8NPJhow+YLljk6/5bh6ja64qn+xA3mR9SlV7fHK0nf6zDVUxmSDHxhdFckO7p/kE9G68gyfXl2H3xw66rLZaVD9yDROOuFRgd7XLqFiZK7xHbxknxFDTz4RBDQr6Gwb4Dq3gaelGHxypz+kV1Dh8klPtjVje8s7bJK1g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TvwnX9H0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E5CAC433C7; Wed, 3 Apr 2024 14:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712155280; bh=AApG/seUAig56ASAD5cr6mRzB8zJFOi+bmt9vVhtVIE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TvwnX9H0sgdbGFDd1FqAggEK95+GxXalvNFt7a3Fe+wGEbhHAnDr3SPR1WAyrRfiN 7pytP/QOG32/1EuxsGyJa3+nWwPUvtZZwYCJ49EGlxtvNlIKcr19wwx/qsoYC8HfaO ta3Jp0aDt4rLBqT6QeE/1SvbROIKKif6hb+WDx868tNqfv3xXwP74i9KuQMiKUl8ZO z0maGbXTN+lBQK553MWLJ9tjDZuAkVlU6nsmt8C2YLyHSUBrygXA80FqxKiU3jErLa jEPRlqR01F78OzOhMMkVKNcu51CZk0FFLim+8W/LFGFFTGP94AoDR5fdGERHGO7egu mN7Z15/3k0i1g== Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-22a95603b47so651220fac.1; Wed, 03 Apr 2024 07:41:20 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVwvB6ha7KpJo0EIjhdEPP3M/RKPKXYDB7It78mgyvn+Jr8F+WRLjlmJv3kWesEJW3q1CXVQDMTQrlZ1yFrNyIY2aMPCLxZN8IF623ZbFanV7BJof/EQTjMgYbBmggt4XH54GaEun8= X-Gm-Message-State: AOJu0YxXz9L9xHrf8CuaJTH5Ca2ybTVuK9mI4WIQbndUd/MCMJo5bYKu R+vbTKmuqgrbVdBkx26pRnXC55lPNHN/i1IvQkBsdldR3AU6xf602wr7O5Q/SnXODLu0e4m5V39 TS/FhFAq4x3imxskQ/qV4AqMZOo4= X-Received: by 2002:a05:6870:797:b0:22e:77b6:4f9d with SMTP id en23-20020a056870079700b0022e77b64f9dmr4407572oab.3.1712155279953; Wed, 03 Apr 2024 07:41:19 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403-gpa-no-cooling-devs-v2-0-79bdd8439449@trvn.ru> <20240403-gpa-no-cooling-devs-v2-1-79bdd8439449@trvn.ru> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 3 Apr 2024 16:41:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] thermal: gov_power_allocator: Allow binding without cooling devices To: Lukasz Luba , Nikita Travkin Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Daniel Lezcano , linux-kernel@vger.kernel.org, Zhang Rui Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 3, 2024 at 2:44=E2=80=AFPM Lukasz Luba wr= ote: > > > > On 4/3/24 12:31, Nikita Travkin via B4 Relay wrote: > > From: Nikita Travkin > > > > IPA was recently refactored to split out memory allocation into a > > separate funciton. That funciton was made to return -EINVAL if there is > > zero power_actors and thus no memory to allocate. This causes IPA to > > fail probing when the thermal zone has no attached cooling devices. > > > > Since cooling devices can attach after the thermal zone is created and > > the governer is attached to it, failing probe due to the lack of coolin= g > > devices is incorrect. > > > > Change the allocate_actors_buffer() to return success when there is no > > cooling devices present. > > > > Fixes: 912e97c67cc3 ("thermal: gov_power_allocator: Move memory allocat= ion out of throttle()") > > Signed-off-by: Nikita Travkin > > --- > > drivers/thermal/gov_power_allocator.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/go= v_power_allocator.c > > index 1b17dc4c219c..ec637071ef1f 100644 > > --- a/drivers/thermal/gov_power_allocator.c > > +++ b/drivers/thermal/gov_power_allocator.c > > @@ -606,7 +606,7 @@ static int allocate_actors_buffer(struct power_allo= cator_params *params, > > > > /* There might be no cooling devices yet. */ > > if (!num_actors) { > > - ret =3D -EINVAL; > > + ret =3D 0; > > goto clean_state; > > } > > > > > > LGTM > > Reviewed-by: Lukasz Luba Applied as 6.9-rc material along with the [2/3], thanks!