git: eb81812fb782 - main - riscv: fix unused var in page_fault_handler()

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Wed, 19 Jan 2022 21:25:05 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=eb81812fb782c302d849953c68c9e1e61facd03d

commit eb81812fb782c302d849953c68c9e1e61facd03d
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2022-01-11 15:24:30 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-01-19 21:21:25 +0000

    riscv: fix unused var in page_fault_handler()
    
    clang warns that p is set-but-not-used, so let's use it.
---
 sys/riscv/riscv/trap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c
index 8eb52fcc5337..b89eae325e0c 100644
--- a/sys/riscv/riscv/trap.c
+++ b/sys/riscv/riscv/trap.c
@@ -205,7 +205,7 @@ page_fault_handler(struct trapframe *frame, int usermode)
 			    frame->tf_scause & SCAUSE_CODE);
 			goto done;
 		}
-		map = &td->td_proc->p_vmspace->vm_map;
+		map = &p->p_vmspace->vm_map;
 	} else {
 		/*
 		 * Enable interrupts for the duration of the page fault. For
@@ -221,7 +221,7 @@ page_fault_handler(struct trapframe *frame, int usermode)
 		} else {
 			if (pcb->pcb_onfault == 0)
 				goto fatal;
-			map = &td->td_proc->p_vmspace->vm_map;
+			map = &p->p_vmspace->vm_map;
 		}
 	}