Skip to content

Commit 1996a10

Browse files
Jan EngelhardtJames Morris
authored andcommitted
security/selinux: constify function pointer tables and fields
Constify function pointer tables and fields. Signed-off-by: Jan Engelhardt <[email protected]> Signed-off-by: James Morris <[email protected]>
1 parent 63cb344 commit 1996a10

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/linux/security.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ static inline struct dentry *securityfs_create_file(const char *name,
23002300
mode_t mode,
23012301
struct dentry *parent,
23022302
void *data,
2303-
struct file_operations *fops)
2303+
const struct file_operations *fops)
23042304
{
23052305
return ERR_PTR(-ENODEV);
23062306
}

security/keys/proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos);
2626
static void proc_keys_stop(struct seq_file *p, void *v);
2727
static int proc_keys_show(struct seq_file *m, void *v);
2828

29-
static struct seq_operations proc_keys_ops = {
29+
static const struct seq_operations proc_keys_ops = {
3030
.start = proc_keys_start,
3131
.next = proc_keys_next,
3232
.stop = proc_keys_stop,
@@ -47,7 +47,7 @@ static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos);
4747
static void proc_key_users_stop(struct seq_file *p, void *v);
4848
static int proc_key_users_show(struct seq_file *m, void *v);
4949

50-
static struct seq_operations proc_key_users_ops = {
50+
static const struct seq_operations proc_key_users_ops = {
5151
.start = proc_key_users_start,
5252
.next = proc_key_users_next,
5353
.stop = proc_key_users_stop,

security/selinux/selinuxfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ static int sel_avc_stats_seq_show(struct seq_file *seq, void *v)
12221222
static void sel_avc_stats_seq_stop(struct seq_file *seq, void *v)
12231223
{ }
12241224

1225-
static struct seq_operations sel_avc_cache_stats_seq_ops = {
1225+
static const struct seq_operations sel_avc_cache_stats_seq_ops = {
12261226
.start = sel_avc_stats_seq_start,
12271227
.next = sel_avc_stats_seq_next,
12281228
.show = sel_avc_stats_seq_show,

0 commit comments

Comments
 (0)