All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@arm.com>, sstabellini@kernel.org
Subject: [PATCH 01/22] xen/arm: traps: Constify show_registers parameters
Date: Thu, 18 Oct 2018 14:20:48 +0100	[thread overview]
Message-ID: <20181018132109.31192-2-julien.grall@arm.com> (raw)
In-Reply-To: <20181018132109.31192-1-julien.grall@arm.com>

show_registers helpers are not meant to modify any parameters.
So constify them.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/traps.c            | 14 +++++++-------
 xen/include/asm-arm/processor.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 51d2e42c77..9eec51ea90 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -787,8 +787,8 @@ static const char *mode_string(uint32_t cpsr)
     return mode_strings[mode] ? : "Unknown";
 }
 
-static void show_registers_32(struct cpu_user_regs *regs,
-                              struct reg_ctxt *ctxt,
+static void show_registers_32(const struct cpu_user_regs *regs,
+                              const struct reg_ctxt *ctxt,
                               int guest_mode,
                               const struct vcpu *v)
 {
@@ -864,8 +864,8 @@ static void show_registers_32(struct cpu_user_regs *regs,
 }
 
 #ifdef CONFIG_ARM_64
-static void show_registers_64(struct cpu_user_regs *regs,
-                              struct reg_ctxt *ctxt,
+static void show_registers_64(const struct cpu_user_regs *regs,
+                              const struct reg_ctxt *ctxt,
                               int guest_mode,
                               const struct vcpu *v)
 {
@@ -925,8 +925,8 @@ static void show_registers_64(struct cpu_user_regs *regs,
 }
 #endif
 
-static void _show_registers(struct cpu_user_regs *regs,
-                            struct reg_ctxt *ctxt,
+static void _show_registers(const struct cpu_user_regs *regs,
+                            const struct reg_ctxt *ctxt,
                             int guest_mode,
                             const struct vcpu *v)
 {
@@ -981,7 +981,7 @@ static void _show_registers(struct cpu_user_regs *regs,
     printk("\n");
 }
 
-void show_registers(struct cpu_user_regs *regs)
+void show_registers(const struct cpu_user_regs *regs)
 {
     struct reg_ctxt ctxt;
     ctxt.sctlr_el1 = READ_SYSREG(SCTLR_EL1);
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 8016cf306f..efa33b4665 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -794,7 +794,7 @@ void init_traps(void);
 void panic_PAR(uint64_t par);
 
 void show_execution_state(struct cpu_user_regs *regs);
-void show_registers(struct cpu_user_regs *regs);
+void show_registers(const struct cpu_user_regs *regs);
 //#define dump_execution_state() run_in_exception_handler(show_execution_state)
 #define dump_execution_state() WARN()
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-10-18 13:20 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 13:20 [PATCH 00/22] xen/arm: Bunch of clean-ups Julien Grall
2018-10-18 13:20 ` Julien Grall [this message]
2018-10-24 14:03   ` [PATCH 01/22] xen/arm: traps: Constify show_registers parameters Andrii Anisov
2018-10-24 14:12     ` Julien Grall
2018-10-18 13:20 ` [PATCH 02/22] xen/arm: regs: Convert guest_mode to a static inline helper Julien Grall
2018-10-24 14:14   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 03/22] xen/arm: Remove __init from prototype Julien Grall
2018-10-24 14:34   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 04/22] xen/arm: bugs: Move do_bug_frame to traps.h Julien Grall
2018-10-24 14:44   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 05/22] xen/arm: Consolidate CPU identification in cpufeature.{c, h} Julien Grall
2018-10-25 15:16   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 06/22] xen/arm: Move VABORT_GEN_BY_GUEST to traps.h and turned into inline Julien Grall
2018-10-25 15:32   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 07/22] xen/arm: gic-3: Remove unused includes Julien Grall
2018-10-25 15:41   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 08/22] xen/arm: gic-v3: Re-order includes in alphabetical order Julien Grall
2018-10-23 12:52   ` Andrii Anisov
2018-10-23 13:26     ` Julien Grall
2018-10-24  8:34       ` Andrii Anisov
2018-10-25 15:33   ` Andrii Anisov
2018-10-25 16:39   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 09/22] xen/arm: Move HSR defines in a new header hsr.h Julien Grall
2018-10-25 16:58   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 10/22] xen/arm: Move SYSREG accessors in sysregs.h Julien Grall
2018-10-25 17:00   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 11/22] xen/arm: Move out of processor.h traps related variable/function Julien Grall
2018-10-25 17:56   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 12/22] xen/arm: Only include stringify.h when necessary Julien Grall
2018-10-25 17:01   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 13/22] xen/arm: Only include vreg.h " Julien Grall
2018-10-25 17:01   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 14/22] xen/arm: Remove unnecessary includes in asm/vgic.h Julien Grall
2018-10-25 17:02   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 15/22] xen/arm: Remove unnecessary includes in asm/mmio.h Julien Grall
2018-10-25 17:50   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 16/22] xen/arm: Remove unnecessary includes in traps.c Julien Grall
2018-10-25 17:50   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 17/22] xen/arm: Remove unnecessary includes in asm/p2m.h Julien Grall
2018-10-25 17:52   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 18/22] xen/arm: Remove unnecessary includes in asm-arm/acpi.h Julien Grall
2018-10-25 17:52   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 19/22] xen/arm: Remove unnecessary include in asm-arm/atomic.h Julien Grall
2018-10-25 17:53   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 20/22] xen/arm: Remove unnecessary includes in asm/current.h Julien Grall
2018-10-25 17:53   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 21/22] xen/arm: platform: Don't include p2m.h in exynos5 and omap5 Julien Grall
2018-10-25 17:55   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 22/22] xen/arm: Move vgic_* helpers from gic.h to vgic.h Julien Grall
2018-10-25 16:55   ` Andrii Anisov

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=20181018132109.31192-2-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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 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.