Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bpf: Constify bpf_verifier_ops structure

This bpf_verifier_ops structure is never modified, like the other
bpf_verifier_ops structures, so declare it as const.

Done with the help of Coccinelle.

Link: http://lkml.kernel.org/r/1449855359-13724-1-git-send-email-Julia.Lawall@lip6.fr

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Julia Lawall and committed by
Steven Rostedt
27dff4e0 c68c0fa2

+1 -1
+1 -1
kernel/trace/bpf_trace.c
··· 316 316 return true; 317 317 } 318 318 319 - static struct bpf_verifier_ops kprobe_prog_ops = { 319 + static const struct bpf_verifier_ops kprobe_prog_ops = { 320 320 .get_func_proto = kprobe_prog_func_proto, 321 321 .is_valid_access = kprobe_prog_is_valid_access, 322 322 };