git: 95cde8b10be2 - stable/13 - pmc_save_user_callchain: eliminate write only td variable

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 02 Oct 2022 04:29:30 UTC
The branch stable/13 has been updated by imp:

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

commit 95cde8b10be21e504222ad9877ecb0a2345f5184
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-08 17:53:30 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-10-02 04:25:52 +0000

    pmc_save_user_callchain: eliminate write only td variable
    
    Sponsored by:           Netflix
    
    (cherry picked from commit 6ca6b8ea523daa6f17e010711458800f30d2e1ee)
---
 sys/dev/hwpmc/hwpmc_arm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c
index ad13ade9bfa5..c585a6cefd1e 100644
--- a/sys/dev/hwpmc/hwpmc_arm.c
+++ b/sys/dev/hwpmc/hwpmc_arm.c
@@ -128,13 +128,11 @@ pmc_save_user_callchain(uintptr_t *cc, int maxsamples,
     struct trapframe *tf)
 {
 	uintptr_t pc, r, oldfp, fp;
-	struct thread *td;
 	int count;
 
 	KASSERT(TRAPF_USERMODE(tf), ("[x86,%d] Not a user trap frame tf=%p",
 	    __LINE__, (void *) tf));
 
-	td = curthread;
 	pc = PMC_TRAPFRAME_TO_PC(tf);
 	*cc++ = pc;