From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument
Date: Wed, 22 Jan 2025 08:07:03 +0100 [thread overview]
Message-ID: <33d13182-69e8-4f86-b049-3ba46df3fa35@linaro.org> (raw)
In-Reply-To: <6e12dd1b-05fc-4094-b422-433ecba27936@ventanamicro.com>
On 17/1/25 13:42, Daniel Henrique Barboza wrote:
>
>
> On 1/16/25 8:04 PM, Philippe Mathieu-Daudé wrote:
>> When methods don't modify the CPUARMState* argument,
>> we can mark it const. This allow enforcing places where
>> the CPU env shouldn't be modified at all,
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>
> We should use 'const' more often in general IMO. It forces a better
> usage and
> understanding of our own APIs.
>
>
> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Thanks!
>> I went via the "modify one and fix until it builds" path,
>> and the result seemed trivial enough, but can try to split
>> if requested.
I actually did split and will respin.
>> ---
>> target/arm/cpu-features.h | 2 +-
>> target/arm/cpu.h | 71 ++++++++++++++++++++-------------------
>> target/arm/internals.h | 10 +++---
>> target/arm/helper.c | 25 +++++++-------
>> target/arm/ptw.c | 2 +-
>> target/arm/tcg/m_helper.c | 8 ++---
>> target/arm/vfp_helper.c | 6 ++--
>> 7 files changed, 63 insertions(+), 61 deletions(-)
next prev parent reply other threads:[~2025-01-22 7:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 23:04 [RFC PATCH 0/2] target/arm: Constify helpers taking CPUARMState arg Philippe Mathieu-Daudé
2025-01-16 23:04 ` [RFC PATCH 1/2] cpus: Introduce const_cpu_env() and const_env_archcpu() Philippe Mathieu-Daudé
2025-01-17 12:39 ` Daniel Henrique Barboza
2025-01-16 23:04 ` [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument Philippe Mathieu-Daudé
2025-01-17 12:42 ` Daniel Henrique Barboza
2025-01-22 7:07 ` Philippe Mathieu-Daudé [this message]
2025-01-17 16:34 ` Philippe Mathieu-Daudé
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=33d13182-69e8-4f86-b049-3ba46df3fa35@linaro.org \
--to=philmd@linaro.org \
--cc=dbarboza@ventanamicro.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).