usb: mon: Change return type to vm_fault_t
Greg Kroah-Hartman
maintainerQuoted 26 lines · Matthew Wilcox
Quoted 5 lines · Greg KH
Quoted 2 lines · Souptick Joarder
Use new return type
vm_fault_tfor fault handler
in structvm_operations_struct.Why?
commit
1c8f422059ae5da07db7406ab916203f9417e396Author: Souptick Joarder <[email protected]> Date: Thu Apr 5 16:25:23 2018 -0700mm: change return type to
vm_fault_tThe plan for these patches is to introduce the typedef, initially just as documentation ("These functions should return a
VM_FAULT_status"). We'll trickle the patches to individualdrivers/filesystemsin through the maintainers, as far as possible. Then we'll change the typedef to an unsigned int and break the compilation of any unconverteddrivers/filesystems.
vmf_insert_page(),vmf_insert_mixed()andvmf_insert_pfn()are three newly added functions. The variousdrivers/filesystemswhere return value offault(),huge_fault(),page_mkwrite()andpfn_mkwrite()get converted, will need them. These functions will return correctVM_FAULT_code based on err value.
Quoted 9 lines
We've had bugs before where drivers returned
-EFOO. And we have this silly inefficiency wherevm_insert_xxx()return an errno which (afaict) every driver then converts into aVM_FAULTcode. In many cases drivers failed to return correctVM_FAULTcode value despite ofvm_insert_xxx()fails. We have indentified and clean up all those existing bugs and silly inefficiencies in driver/filesystems by adding these three new inline wrappers. As mentioned above, we will trickle those patches to individualdrivers/filesystemsin through maintainers after these three wrapper functions are merged.
Then put a summary of this type of thing in the original patch please!
When a maintainer gets a patch with no context at all, the first reaction is to just reject it (especially as many of these patches were sent privately and did not go on any public mailing list, those all got automatically dropped...) Make it trivial for a reviewer to understand what the patch is for and why it needs to be applied.
thanks,
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html