Messages in this thread | | | Date | Tue, 29 May 2018 07:50:55 -0700 | From | Matthew Wilcox <> | Subject | Re: [PATCH] mm: Change return type to vm_fault_t |
| |
On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type.
I don't believe you've checked this with sparse.
> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, > bool *unlocked) > { > struct vm_area_struct *vma; > - int ret, major = 0; > + int major = 0; > + vm_fault_t ret; > > if (unlocked) > fault_flags |= FAULT_FLAG_ALLOW_RETRY;
... major |= ret & VM_FAULT_MAJOR;
That should be throwing a warning.
| |