git: 6ca6b8ea523d - main - pmc_save_user_callchain: eliminate write only td variable

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 05 Apr 2022 04:32:17 UTC
The branch main has been updated by imp:

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

commit 6ca6b8ea523daa6f17e010711458800f30d2e1ee
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-04-05 00:05:03 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-05 04:29:33 +0000

    pmc_save_user_callchain: eliminate write only td variable
    
    Sponsored by:           Netflix
---
 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 e9e4aef7ec01..0e239f60eac0 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;