mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] uprobes/x86: constify uprobe_xol_ops structures
@ 2016-04-09 11:17 Julia Lawall
  2016-04-13 11:27 ` [tip:perf/core] uprobes/x86: Constify " tip-bot for Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2016-04-09 11:17 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: kernel-janitors, Ingo Molnar, H. Peter Anvin, x86, linux-kernel

The uprobe_xol_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 arch/x86/kernel/uprobes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index bf4db6e..bd07415 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -578,7 +578,7 @@ static void default_abort_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
 	riprel_post_xol(auprobe, regs);
 }
 
-static struct uprobe_xol_ops default_xol_ops = {
+static const struct uprobe_xol_ops default_xol_ops = {
 	.pre_xol  = default_pre_xol_op,
 	.post_xol = default_post_xol_op,
 	.abort	  = default_abort_op,
@@ -695,7 +695,7 @@ static void branch_clear_offset(struct arch_uprobe *auprobe, struct insn *insn)
 		0, insn->immediate.nbytes);
 }
 
-static struct uprobe_xol_ops branch_xol_ops = {
+static const struct uprobe_xol_ops branch_xol_ops = {
 	.emulate  = branch_emulate_op,
 	.post_xol = branch_post_xol_op,
 };

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-13 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-09 11:17 [PATCH] uprobes/x86: constify uprobe_xol_ops structures Julia Lawall
2016-04-13 11:27 ` [tip:perf/core] uprobes/x86: Constify " tip-bot for Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®