ANDROID: Fix sparse warning in __handle_speculative_fault caused by SPF
SPF patchset introduced a sparse warning caused by the mismatch in
__handle_speculative_fault function's return type. Fix the return
type.
Fixes: 1c53717440 ("FROMLIST: mm: provide speculative fault infrastructure")
Bug: 161210518
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I27c75f2b3729fa5d4b610f4a1829c9beba29735c
This commit is contained in:
@@ -1749,14 +1749,14 @@ extern int fixup_user_fault(struct mm_struct *mm,
|
||||
bool *unlocked);
|
||||
|
||||
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
|
||||
extern int __handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma);
|
||||
static inline int handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma)
|
||||
extern vm_fault_t __handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma);
|
||||
static inline vm_fault_t handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma)
|
||||
{
|
||||
/*
|
||||
* Try speculative page fault for multithreaded user space task only.
|
||||
@@ -1770,10 +1770,10 @@ static inline int handle_speculative_fault(struct mm_struct *mm,
|
||||
extern bool can_reuse_spf_vma(struct vm_area_struct *vma,
|
||||
unsigned long address);
|
||||
#else
|
||||
static inline int handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma)
|
||||
static inline vm_fault_t handle_speculative_fault(struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
unsigned int flags,
|
||||
struct vm_area_struct **vma)
|
||||
{
|
||||
return VM_FAULT_RETRY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user