Skip to content

Commit

Permalink
Make scheduler debug file operations const
Browse files Browse the repository at this point in the history
In general, struct file_operations are const in the kernel, to not have
false cacheline sharing and to catch bugs at compiletime with accidental
writes to them. The new scheduler code introduces a new non-const one;
fix this up.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Oct 15, 2007
1 parent 7a6c6bc commit 0dbee3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static int sched_debug_open(struct inode *inode, struct file *filp)
return single_open(filp, sched_debug_show, NULL);
}

static struct file_operations sched_debug_fops = {
static const struct file_operations sched_debug_fops = {
.open = sched_debug_open,
.read = seq_read,
.llseek = seq_lseek,
Expand Down

0 comments on commit 0dbee3a

Please sign in to comment.