From 4aec198420ecbb5c0823b2a71bc0dc0c03bc6bfd Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 13 Apr 2022 16:08:23 -0700 Subject: [PATCH] sched_ule: Inline value of ts in sched_thread_priority. This avoids a set but unused warning in kernels without SMP where TDQ_CPU() doesn't use its argument. --- sys/kern/sched_ule.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 46b3b9aa418..9fd592f9647 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1812,7 +1812,6 @@ sched_pctcpu_update(struct td_sched *ts, int run) static void sched_thread_priority(struct thread *td, u_char prio) { - struct td_sched *ts; struct tdq *tdq; int oldpri; @@ -1827,7 +1826,6 @@ sched_thread_priority(struct thread *td, u_char prio) SDT_PROBE4(sched, , , lend__pri, td, td->td_proc, prio, curthread); } - ts = td_get_sched(td); THREAD_LOCK_ASSERT(td, MA_OWNED); if (td->td_priority == prio) return; @@ -1848,7 +1846,7 @@ sched_thread_priority(struct thread *td, u_char prio) * information so other cpus are aware of our current priority. */ if (TD_IS_RUNNING(td)) { - tdq = TDQ_CPU(ts->ts_cpu); + tdq = TDQ_CPU(td_get_sched(td)->ts_cpu); oldpri = td->td_priority; td->td_priority = prio; if (prio < tdq->tdq_lowpri)