All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-arm@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Chao Liu" <chao.liu@processmission.com>
Subject: [PATCH 06/13] target/riscv: Constify @iprio argument in riscv_cpu_pending_to_irq()
Date: Thu, 20 Aug 2026 12:47:22 +0200	[thread overview]
Message-ID: <20260820104730.25462-7-philmd@oss.qualcomm.com> (raw)
In-Reply-To: <20260820104730.25462-1-philmd@oss.qualcomm.com>

@iprio[] is an array only accessed read-only.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 target/riscv/cpu.h | 2 +-
 target/riscv/cpu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 376cff656fa..bb4c8563554 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -642,7 +642,7 @@ int riscv_cpu_sirq_pending(CPURISCVState *env);
 int riscv_cpu_vsirq_pending(CPURISCVState *env);
 int riscv_cpu_pending_to_irq(CPURISCVState *env,
                              int extirq, unsigned int extirq_def_prio,
-                             uint64_t pending, uint8_t *iprio);
+                             uint64_t pending, const uint8_t *iprio);
 
 
 bool riscv_cpu_fp_enabled(CPURISCVState *env);
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index e73ff53159c..68f5a620402 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -866,7 +866,7 @@ uint8_t riscv_cpu_default_priority(int irq)
 
 int riscv_cpu_pending_to_irq(CPURISCVState *env,
                              int extirq, unsigned int extirq_def_prio,
-                             uint64_t pending, uint8_t *iprio)
+                             uint64_t pending, const uint8_t *iprio)
 {
     int irq, best_irq = RISCV_EXCP_NONE;
     unsigned int prio, best_prio = UINT_MAX;
-- 
2.53.0



  parent reply	other threads:[~2026-08-20 10:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 10:47 [PATCH 00/13] cpus: Constify @cpu in SysemuCPUOps::has_work() handler Philippe Mathieu-Daudé
2026-08-20 10:47 ` [PATCH 01/13] target/avr: Constify CPUAVRState for some cpu_*() getters Philippe Mathieu-Daudé
2026-08-20 12:36   ` marcandre.lureau
2026-08-20 10:47 ` [PATCH 02/13] target/i386: Constify CPU*State for cpu_*_interrupt() getters Philippe Mathieu-Daudé
2026-08-20 12:36   ` marcandre.lureau
2026-08-20 10:47 ` [PATCH 03/13] target/loongarch: Constify CPULoongArchState for various cpu_*() getters Philippe Mathieu-Daudé
2026-08-20 12:36   ` marcandre.lureau
2026-08-20 10:47 ` [PATCH 04/13] target/mips: Constify CPUMIPSState " Philippe Mathieu-Daudé
2026-08-20 12:36   ` marcandre.lureau
2026-08-20 10:47 ` [PATCH 05/13] target/s390x: Constify S390CPU for cpu_has_*() getters Philippe Mathieu-Daudé
2026-08-20 11:06   ` Ilya Leoshkevich
2026-08-20 12:36   ` marcandre.lureau
2026-08-20 19:22   ` Eric Farman
2026-08-20 10:47 ` Philippe Mathieu-Daudé [this message]
2026-08-20 13:22   ` [PATCH 06/13] target/riscv: Constify @iprio argument in riscv_cpu_pending_to_irq() marcandre.lureau
2026-08-20 10:47 ` [PATCH 07/13] target/riscv: Constify CPURISCVState for various cpu_*() getters Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 10:47 ` [PATCH 08/13] target/sparc: Constify CPUSPARCState " Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 10:47 ` [RFC PATCH 09/13] cpus: Add const-qualified CPU environment accessors Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 15:21   ` Richard Henderson
2026-08-20 16:24     ` Philippe Mathieu-Daudé
2026-08-20 16:50       ` Philippe Mathieu-Daudé
2026-08-20 17:09         ` Marc-André Lureau
2026-08-20 23:15         ` Richard Henderson
2026-08-20 10:47 ` [RFC PATCH 10/13] target/riscv: Constify CPURISCVState for various cpu_*() getters Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 10:47 ` [RFC PATCH 11/13] target/hexagon: Constify CPUHexagonState in hexagon_thread_is_enabled() Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 15:28   ` Brian Cain
2026-08-20 10:47 ` [RFC PATCH 12/13] target/mips: Constify CPUMIPSState in mips_vpe_active() Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 10:47 ` [RFC PATCH 13/13] cpus: Constify @cpu in SysemuCPUOps::has_work() handler Philippe Mathieu-Daudé
2026-08-20 11:05   ` Philippe Mathieu-Daudé
2026-08-20 13:22   ` marcandre.lureau
2026-08-20 13:55     ` 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=20260820104730.25462-7-philmd@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=alistair.francis@wdc.com \
    --cc=chao.liu@processmission.com \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=liwei1518@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhiwei_liu@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.