error:initialization of ‘vm_fault_t (*)(struct vm_fault )’ {aka 'unsigned int ()(struct vm_fault )'} from incompatiable pointer type 'int ()(struct vm_fault *)’
解决方案:
在代码中加入强转
struct vm_operations_struct mmapnopage_vm_ops = { .fault = (unsigned int (*)(struct vm_fault *))mmapnopage_vm_fault, };