Posted Aug 13, 2009 2:06 UTC (Thu) by jamesmrh (guest, #31622)
Parent article: In Brief
FWIW, checkpatch.pl does check some operations for const (file_operations and seq_operations), but this will only help new patches which are actually passed through the script.
There are some other operations to cover, too.
If anyone wants to help, have a wade through the grsecurity patch for hints.
I'm pretty sure I made some corrections since then, so don't depend on the above to be 100% correct.
I can upload the simple/ugly script I used to automate fixing them up a bit.
-Brad
const function pointers
Posted Aug 13, 2009 19:02 UTC (Thu) by spender (subscriber, #23067)
[Link]
There were only two things in 2.6.30.4 that needed the writable *_ops (I fixed up file_operations, seq_operations, dentry_operations, inode_operations, address_space_operations, vm_operations, super_operations): drivers/scsi/sg.c and virt/kvm/kvm_main.c
sg.c I fixed trivially, kvm_main.c can't be fixed easily without making the code ugly.
-Brad
const function pointers
Posted Aug 13, 2009 22:50 UTC (Thu) by jamesmrh (guest, #31622)
[Link]