Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2768132lqz; Wed, 3 Apr 2024 08:07:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4lfRiml8/Q64zHlYWUoZ1PlXU29OEk9oN8Xc+RzlcU9D3/HkKPGgAgPC9iI711T9DSW3NVPlC/mZ0tbZz4jf9t1aPkVgm8nNcD/B5OA== X-Google-Smtp-Source: AGHT+IHtfiS8US5PUFZKzaQRAHu1LTtpnDHOrxN2myVFmKOFLCjm3ybFAiBHir6lXw40Mz4Gu/Ru X-Received: by 2002:a9d:7984:0:b0:6e5:a89:2ddd with SMTP id h4-20020a9d7984000000b006e50a892dddmr17361059otm.27.1712156825134; Wed, 03 Apr 2024 08:07:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712156825; cv=pass; d=google.com; s=arc-20160816; b=0V7TRRgqIip3msDxtsjNi4jcD+hO5Gv3AJNbvPgNqUjVlU22fovIKdIZZNVuE7TfvT WFMctTlZhdna7STQ2VafLpc21BbVT1WPacPmZ1pt/Az9wAUN+uqoGjCUvwitIvt6uywO a6qMDG/9o2bJwxK5ckJ1+RH8Lj/n72e6vuwU5HD9Q9Vy7IO4nM5FPRFyKRPifYvHbARl LdLvvRZJJNY1UQ+KtF2+aHaOiD8XXEov2MdnwCNYqj9jjEk4zibpuBABqONh/YLIsgUR Ale9v/mwaMI52vJ1T1WhC+NB5l6Gsa2o8R8MH7GB7UTyY6LiSOKPSbybg3qIjwyUUVaD iVUw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=YEFFELfkhhxMB8t8T3IkUGwyVhhIF/MUw3ZMNFl/UUY=; fh=UK79mgEV0aGIDdcoP8DZ6HpjwyEDqF8s4ixJKVVy1IU=; b=0iqkwfMprc5OVc+oYjCnaOL51SYLyBtX1y9fvyu1jXltkxdtvCbkkV1SsmjyGTKxaf o2hnRb1uqOtEUk4HR7SsmOsmCIkKcpDd5tRmdAUhN/HFWFh2HR1zQf3T8Byy/ib0guEA os1bV5jcVBaF3PskHQN/2l37P+IjFK7xqAXBOSSyI5LlvHI9opNFww3BiWJT2vyPyr14 qp7jGOTUCSJqXgwdVWEy8LmnxSlAH9JYSwxcQhAvh5y0C+WeyAIcNB1/Z5/t7Mrymxgi KC4JEcPi/Z3Yd+PrM94pr7roEomRu8vKqg+oPzpdbsNMrAl+NoJ7bQlWR870H10vq27f p1TA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-130025-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ca6-20020a056122400600b004d41d195b2asi2066337vkb.242.2024.04.03.08.07.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130025-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-130025-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 58E7F1C28567 for ; Wed, 3 Apr 2024 15:04:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53AD914A4FF; Wed, 3 Apr 2024 15:03:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D811149C77; Wed, 3 Apr 2024 15:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156597; cv=none; b=bzKY6X+FTt7LD6mNSIGyoWYazNdkz6I5N2dR9uwoqaQWcCVEmpuS7Zlmt0jwIe2GDpvqWUInlYVa1i76iT9bQwbgPiNsvYz+YkLifr+joHt6fvfdkESAQDvC6KSO3vfUjHH6x4yRslKeILd/M5jI0KtwCcIl8gbHjvokNUg/d6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156597; c=relaxed/simple; bh=Frz84vO4VsjdnU9kefMIEq/lRqmniHBcyzlIQjKHI/Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LbJsnjZuHC3zLEQBgslLPC5O6po6Al1ByLTGikluGW98VkUPXYW/xCKv5RuvOwNM0iXc8zQbnHglKH8NDegJCy79fH/2gHjSIB5GJTWjquE9rog8q2zXQsATwT+1yTu0KgFM/6qJQUy3vi8eVxL9Aw4+iFx5UfoxW4FBpLuTjhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC4BD1007; Wed, 3 Apr 2024 08:03:46 -0700 (PDT) Received: from [10.57.72.191] (unknown [10.57.72.191]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 77B453F7B4; Wed, 3 Apr 2024 08:03:14 -0700 (PDT) Message-ID: <89f37c4a-a1fd-4806-9d05-0dc347252b4d@arm.com> Date: Wed, 3 Apr 2024 16:03:16 +0100 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 v2 1/3] thermal: gov_power_allocator: Allow binding without cooling devices Content-Language: en-US To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Nikita Travkin , Daniel Lezcano , linux-kernel@vger.kernel.org, Zhang Rui References: <20240403-gpa-no-cooling-devs-v2-0-79bdd8439449@trvn.ru> <20240403-gpa-no-cooling-devs-v2-1-79bdd8439449@trvn.ru> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/3/24 15:41, Rafael J. Wysocki wrote: > On Wed, Apr 3, 2024 at 2:44 PM Lukasz Luba wrote: >> >> >> >> 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 cooling >>> 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 allocation 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/gov_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_allocator_params *params, >>> >>> /* There might be no cooling devices yet. */ >>> if (!num_actors) { >>> - ret = -EINVAL; >>> + ret = 0; >>> goto clean_state; >>> } >>> >>> >> >> LGTM >> >> Reviewed-by: Lukasz Luba > > Applied as 6.9-rc material along with the [2/3], thanks! > Thank you Rafael!