Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp203110lqe; Thu, 4 Apr 2024 04:26:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZG+PreBMQVt4mo+gpQdCRENwxlRT3gUPiAg0EaZVVlD7dFGkzPsfZ6C8EgodteHODIHhhXV2joCkSOhXY7JQzMw8lxDhSSzrCaNriog== X-Google-Smtp-Source: AGHT+IG+QMZ6vD04SJJFAYaERyc8akAiNzWobkSEMppbB1mD8S+A58+4UZblzT7O1uqNcIn9EfH4 X-Received: by 2002:a05:620a:167b:b0:78a:61d0:3f4 with SMTP id d27-20020a05620a167b00b0078a61d003f4mr1881783qko.75.1712230005430; Thu, 04 Apr 2024 04:26:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712230005; cv=pass; d=google.com; s=arc-20160816; b=APXAWmL8hF301uJGLaCcEQjU+3q03vyVXSUN+vp6fhkr3MLvkLKu7tcbxsu1SmWK88 ZeLT/Q/gpsBKtSIrtnDCG9/3gyPDAVi5pyNPxr1PgBsUOtbWobHSK4f70dInl3qFU4/G wZUyfjaAQ0wO1HZtLhwd9mFvwRN56YF2B1g+Q/JRwpzVZXbi6CMf2PqU9bs2ZIzXg3cp aXjBFMa+YNxn+0W5wRAffZiETHoSpx5+NWKCToggIbyqqlkK8Xb2JG/uczTezmf1pNkW WfZJvh2FSUsGeOSQFJ0xFINfhQqAYq9Sqk/j967ZCIgn9YOZ+WIXMrN49lOQdhkoDeuk ZyIg== 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=AqG61FCgpsrVfhpM296EK5ElJNE+FPstJiJDjnxx0DU=; fh=22oGAZ1Ogq/KP1hvbtQ7bVI0naSO4PC48f/0YrQMvL4=; b=sAGQw+7Hxl86zQ8+vnZiZL2+Ny0gaRTVhfeAAJEu5xS8fU4g2jZdU86MZcpgNRVr4b Gov2yYgOwxtK15jj8D3dCpo8KLV27C1RKhbA1tgiPF+9nhehdBaXkrEoGQdiviTSJKSF 5uf5V+9ByosLZlw6nwK8gKDMV44ovhLwNY0vhZzjkMaG4uVh0vlI19BqBZGcsOhps+90 xHRfn45VEm7yvlNqP4zrcsN5xN0uEJuN4nuswtzVv4Ac+AP1rG/KuVIv4KuJNXRTRerI rk/p+Zbmo5/0yrHXDQwuNHaKiJ+dfBYZm8TEp9axn3JxrUSVFm1uWvuTMihrMTcE11cn G7+g==; 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-131310-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131310-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 ye2-20020a05620a3b8200b0078a35250c01si16276427qkn.387.2024.04.04.04.26.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131310-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-131310-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131310-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 1C8261C25A29 for ; Thu, 4 Apr 2024 11:26:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A357482D7A; Thu, 4 Apr 2024 11:26:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 663EA8286B; Thu, 4 Apr 2024 11:26:36 +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=1712229998; cv=none; b=OcTY1ZyCplUCTnrmUZ3nLKJVDlUIf5GO64KXiyoQiBfrg5gF/pqPMqyzBRZzDex1zUwHE2rz1vDrDUninYpJYLyByJD/PUht2HfJglVGbwzq6mY3tTEFtGxaW+MxgMLxB2BSWI36vsuxjzvz8ItIeMeiN/ahB5s2Dvzb5xxLX4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229998; c=relaxed/simple; bh=l2B8DsM6rv9m6KxY3JGKVlChYIWsAzS5o8y7YJPs8Hg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MXyAApCZBuRJJCn+Vd/EyFefOJK8w73xwumP13XaNooIMOtpJ+c7EiGSn7djfSRXpsINHOmrLcLJPVeLOhU8Mj+tYUXv/tzjGFHmCaPYTgtEURnVYq/v9X8s+Qd1FBnqnZolPVMDgGb0MYS7LQK+oUch0lymRnnpD0V9YBea+Vg= 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 9AAA7FEC; Thu, 4 Apr 2024 04:27:06 -0700 (PDT) Received: from [10.57.73.43] (unknown [10.57.73.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1BD103F7B4; Thu, 4 Apr 2024 04:26:34 -0700 (PDT) Message-ID: <6f950b18-4ff7-4570-957d-49b46167c12e@arm.com> Date: Thu, 4 Apr 2024 12:26:36 +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 v1 2/2] thermal: gov_step_wise: Simplify checks related to passive trips Content-Language: en-US To: "Rafael J. Wysocki" Cc: LKML , Daniel Lezcano , Linux PM References: <5766468.DvuYhMxLoT@kreacher> <2318465.ElGaqSPkdT@kreacher> From: Lukasz Luba In-Reply-To: <2318465.ElGaqSPkdT@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/3/24 19:12, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Make it more clear from the code flow that the passive polling status > updates only take place for passive trip points. > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/thermal/gov_step_wise.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > Index: linux-pm/drivers/thermal/gov_step_wise.c > =================================================================== > --- linux-pm.orig/drivers/thermal/gov_step_wise.c > +++ linux-pm/drivers/thermal/gov_step_wise.c > @@ -92,15 +92,13 @@ static void thermal_zone_trip_update(str > if (instance->initialized && old_target == instance->target) > continue; > > - if (old_target == THERMAL_NO_TARGET && > - instance->target != THERMAL_NO_TARGET) { > - /* Activate a passive thermal instance */ > - if (trip->type == THERMAL_TRIP_PASSIVE) > + if (trip->type == THERMAL_TRIP_PASSIVE) { > + /* If needed, update the status of passive polling. */ > + if (old_target == THERMAL_NO_TARGET && > + instance->target != THERMAL_NO_TARGET) > tz->passive++; > - } else if (old_target != THERMAL_NO_TARGET && > - instance->target == THERMAL_NO_TARGET) { > - /* Deactivate a passive thermal instance */ > - if (trip->type == THERMAL_TRIP_PASSIVE) > + else if (old_target != THERMAL_NO_TARGET && > + instance->target == THERMAL_NO_TARGET) > tz->passive--; > } > > > > The patch looks good, although I got some warning while applying with my b4 tool: BADSIG: DKIM/rjwysocki.net Anyway, it looks like false warning IMO. Reviewed-by: Lukasz Luba