qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMSta


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument
Date: Wed, 22 Jan 2025 08:07:03 +0100
User-agent: Mozilla Thunderbird

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(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]