Print this page
const-ify make segment ops structures
There is no reason to keep the segment ops structures writable.

*** 186,196 **** /* * XXX this struct is used by rootnex_map_fault to identify * the segment it has been passed. So if you make it * "static" you'll need to fix rootnex_map_fault. */ ! struct seg_ops segdev_ops = { .dup = segdev_dup, .unmap = segdev_unmap, .free = segdev_free, .fault = segdev_fault, .faulta = segdev_faulta, --- 186,196 ---- /* * XXX this struct is used by rootnex_map_fault to identify * the segment it has been passed. So if you make it * "static" you'll need to fix rootnex_map_fault. */ ! const struct seg_ops segdev_ops = { .dup = segdev_dup, .unmap = segdev_unmap, .free = segdev_free, .fault = segdev_fault, .faulta = segdev_faulta,