From: Paul Walmsley <pjw@kernel.org>
To: Hui Wang <hui.wang@canonical.com>
Cc: linux-riscv@lists.infradead.org, pjw@kernel.org,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
danil.skrebenkov@cloudbear.ru, ajones@ventanamicro.com,
atish.patra@linux.dev
Subject: Re: [PATCH v1 1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool
Date: Wed, 27 May 2026 18:41:01 -0600 (MDT) [thread overview]
Message-ID: <81892db4-cf4c-0a1d-d94d-460d528fa064@kernel.org> (raw)
In-Reply-To: <20260413123515.48423-1-hui.wang@canonical.com>
On Mon, 13 Apr 2026, Hui Wang wrote:
> In the original sbi_cpu_is_stopped(), if rc doesn't equal to the
> SBI_HSM_STATE_STOPPED, it will return rc to the caller directly. But
> there is a hidden problem, the rc could be SBI_HSM_STATE_STARTED, if
> so, this function will report cpu stopped while the cpu isn't really
> stopped.
>
> Furthermore, from the name of cpu_is_stopped(), it gives a sense the
> return value is a bool type, true means the cpu is stopped, conversely
> false means the cpu is not stopped.
>
> Here change the return value type to bool and change the callers
> accordingly. This could fix the above two issues.
>
> Fixes: f1e58583b9c7c ("RISC-V: Support cpu hotplug")
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
Thanks, queued for v7.2.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2026-05-28 0:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 12:35 [PATCH v1 1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool Hui Wang
2026-04-13 12:35 ` [PATCH v1 2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error Hui Wang
2026-05-28 0:40 ` Paul Walmsley
2026-05-28 0:41 ` Paul Walmsley [this message]
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=81892db4-cf4c-0a1d-d94d-460d528fa064@kernel.org \
--to=pjw@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@linux.dev \
--cc=danil.skrebenkov@cloudbear.ru \
--cc=hui.wang@canonical.com \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
/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