Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp148785rdb; Wed, 20 Dec 2023 08:28:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXd/Pt7LC1JlZMVPS1BGpIMRDnj1jPzE0+qm9MFVw75tIrqksJ9+HHCdNvLGtr7UZjnJnf X-Received: by 2002:a05:622a:130b:b0:427:91cc:19ec with SMTP id v11-20020a05622a130b00b0042791cc19ecmr467779qtk.127.1703089710353; Wed, 20 Dec 2023 08:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703089710; cv=none; d=google.com; s=arc-20160816; b=mhnLQN17+8LrX0Ui/GkJ6hqLDw9uZpSXJ1tkf/dIXoMH8peJjbKC3EnVqcw8h+D4S2 6sfx/00X6HpKGOHYaKQXeFMCeT02BOfKHdSdE5IUyYjVnOjktU43H44TTNsS6Xu3eIpZ WEp51mq7J42IQ6dYOEk5ERvgDFztN7uQhe/YUtNC6Eb1OGtkU785q5/LsAa27D57BDJp mKyJciyp0oX+9hZtLnTuBZe2PwP93OBjOxhIVgwXm/od7f6uxkky3jDWmLpLnyrsNJsd YGNk0qDzkLCES7M9eY5s+HgCcxtg2WrlOesmqrgFDuuZfa8hblkqCrwlN1ep2lJTzSHp Gl+w== ARC-Message-Signature: i=1; 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=qJDgdxb0R+VOJQ+gqcJpGj7Y72hI5QCNIhIH53ZS3jg=; fh=s+3ccwKL/Xc2i8uH9tAeSOb9IGpvLhPrVmnBNs/vSzQ=; b=Ta3QtvAFTVgPz9bsaUXz9W+8IowLK5sDXXEGHZUYOb/6whL2DTZ1mnOOZm+5+B2FeJ ETUfC3XLP4nfk2Dzj1LPXAmOoqkrW1DxE35Z738OQGXNV4by6ZkGLUieeL0HC0bqvvn6 ONKnXzwPeciUhjJ1rez88/af2iZFaATMBoO25GAY18UoyaeZQdAZH4fZeqbZrnZz54d2 XjEKtzBIdl5LAnpNwmk/Y4QyVCL0CdiI+LusiI/jkzy4ExullA1yPwS0qwSGMPcw/BfX FCD5ImGAR5miEDZV6YFxJFMunrIJ9D2Xi+krbks51Yr4T1gRP8SEXMDg7vdbGs84642Y vXwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7295-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 w18-20020ac87e92000000b0042550af1234si27831qtj.373.2023.12.20.08.28.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 08:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7295-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; spf=pass (google.com: domain of linux-kernel+bounces-7295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7295-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 21CCC1C2415D for ; Wed, 20 Dec 2023 16:28:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E33A46427; Wed, 20 Dec 2023 16:28:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DE1D4185B; Wed, 20 Dec 2023 16:28:00 +0000 (UTC) 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 C23341FB; Wed, 20 Dec 2023 08:28:44 -0800 (PST) Received: from [10.57.82.217] (unknown [10.57.82.217]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 06A4A3F64C; Wed, 20 Dec 2023 08:27:58 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2023 16:29:05 +0000 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 2/5] thermal: gov_power_allocator: Refactor check_power_actors() Content-Language: en-US To: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, rui.zhang@intel.com References: <20231206113138.3576492-1-lukasz.luba@arm.com> <20231206113138.3576492-3-lukasz.luba@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/20/23 14:07, Rafael J. Wysocki wrote: > On Wed, Dec 6, 2023 at 12:30 PM Lukasz Luba wrote: >> >> Refactor check_power_actors() to make it possible for re-use in the >> upcoming new callback. > > I would say "In preparation for a subsequent change, rearrange > check_power_actors()". Agree, I'll use it. >> >> No intentional functional impact. >> >> Signed-off-by: Lukasz Luba >> --- >> drivers/thermal/gov_power_allocator.c | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c >> index 785fff14223d..38e1e89ba10c 100644 >> --- a/drivers/thermal/gov_power_allocator.c >> +++ b/drivers/thermal/gov_power_allocator.c >> @@ -581,8 +581,9 @@ static void allow_maximum_power(struct thermal_zone_device *tz, bool update) >> * power actor API. The warning should help to investigate the issue, which >> * could be e.g. lack of Energy Model for a given device. >> * >> - * Return: 0 on success, -EINVAL if any cooling device does not implement >> - * the power actor API. >> + * Return number of cooling devices or -EINVAL if any cooling device does not >> + * implement the power actor API. Return value 0 is also valid since cooling >> + * devices might be attached later. > > I would say "If all of the cooling devices currently attached to @tz > implement the power actor API, return the number of them (which may be > 0, because some cooling devices may be attached later). Otherwise, > return -EINVAL." > Yes, I'll use that sentence as well. Those will be in the next version (v3). Thanks!