From: Breno Leitao <leitao@debian.org>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Huisong Li <lihuisong@huawei.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, pjaroszynski@nvidia.com,
rmikey@meta.com, kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH] ACPI: arm64: cpuidle: Tolerate platforms with no deep PSCI idle states
Date: Tue, 21 Apr 2026 02:51:42 -0700 [thread overview]
Message-ID: <aedGoi-Fk5HPK0OO@gmail.com> (raw)
In-Reply-To: <20260420-sturdy-unique-shark-c4ca8c@sudeepholla>
On Mon, Apr 20, 2026 at 04:12:38PM +0100, Sudeep Holla wrote:
> On Mon, Apr 20, 2026 at 02:27:13AM -0700, Breno Leitao wrote:
> > - count = pr->power.count - 1;
> > - if (count <= 0)
> > - return -ENODEV;
> > -
>
> Does it make sense to retain this check like
> if (pr->power.count < 1)
> return -EINVAL;
>
> Though I see the assignment to pr->power.count in drivers/acpi/processor_idle.c
> is through unsigned int. So I am fine even without the above check.
I don't think the check is necessary. When count is 0 or 1, the loop
for (i = 1; i < pr->power.count; i++) body won't execute, and the
function will return 0.
This seems like the correct behavior — if there are no FFH PSCI states
to validate, there's nothing that should fail.
Additionally, returning -ENODEV would trigger the "Invalid FFH LPI data"
error message, which would be misleading since the LPI data isn't
invalid, it's just not present.
That said, please take this with a grain of salt since I'm not deeply
familiar with _LPI states and their expected behavior.
Thanks for the review,
--breno
next prev parent reply other threads:[~2026-04-21 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 9:27 [PATCH] ACPI: arm64: cpuidle: Tolerate platforms with no deep PSCI idle states Breno Leitao
2026-04-20 15:12 ` Sudeep Holla
2026-04-21 9:51 ` Breno Leitao [this message]
2026-04-21 9:58 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aedGoi-Fk5HPK0OO@gmail.com \
--to=leitao@debian.org \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=kernel-team@meta.com \
--cc=lenb@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=pjaroszynski@nvidia.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=rmikey@meta.com \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox