lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2018-05-29 16:52    [W:0.055 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site