Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751436AbbLKRsQ (ORCPT ); Fri, 11 Dec 2015 12:48:16 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:38155 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbbLKRsP (ORCPT ); Fri, 11 Dec 2015 12:48:15 -0500 X-IronPort-AV: E=Sophos;i="5.20,414,1444687200"; d="scan'208";a="191619853" From: Julia Lawall To: Steven Rostedt Cc: kernel-janitors@vger.kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH] bpf: constify bpf_verifier_ops structure Date: Fri, 11 Dec 2015 18:35:59 +0100 Message-Id: <1449855359-13724-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 30 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. Signed-off-by: Julia Lawall --- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 4228fd3..45dd798 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -316,7 +316,7 @@ static bool kprobe_prog_is_valid_access(int off, int size, enum bpf_access_type return true; } -static struct bpf_verifier_ops kprobe_prog_ops = { +static const struct bpf_verifier_ops kprobe_prog_ops = { .get_func_proto = kprobe_prog_func_proto, .is_valid_access = kprobe_prog_is_valid_access, }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/