Skip to content

Commit

Permalink
ARC: mm: do_page_fault refactor #2: remove short lived variable
Browse files Browse the repository at this point in the history
Compiler will do this anyways, still..

No functional change.

Signed-off-by: Vineet Gupta <[email protected]>
  • Loading branch information
vineetgarc committed Jul 1, 2019
1 parent 450e5b6 commit 13e2cc1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/arc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,18 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->mm;
int si_code = SEGV_MAPERR;
int ret;
vm_fault_t fault;
int write = regs->ecr_cause & ECR_C_PROTV_STORE; /* ST/EX */
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;

/*
* We fault-in kernel-space virtual memory on-demand. The
* 'reference' page table is init_mm.pgd.
*
* NOTE! We MUST NOT take any locks for this case. We may
* be in an interrupt or a critical region, and should
* only copy the information from the master page table,
* nothing more.
*/
if (address >= VMALLOC_START && !user_mode(regs)) {
ret = handle_kernel_vaddr_fault(address);
if (unlikely(ret))
if (unlikely(handle_kernel_vaddr_fault(address)))
goto no_context;
else
return;
Expand Down

0 comments on commit 13e2cc1

Please sign in to comment.