const structs

Stephen Williams (
Sat, 13 Sep 1997 13:21:43 +0800

Is there any reason that struct proc_dir_entry takes a non-const pointer
to a struct inode_operations? Couldn't

struct inode_operations * ops;


const struct inode_operations * ops;

There are other tables throughout the kernel that I also believe to be
constant. What about the parameters to register_chrdev, etc?

It's my C++ habit, I use const whenever I can:-)

Steve Williams

"The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."