The branch main has been updated by jhb:

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

commit 4aec198420ecbb5c0823b2a71bc0dc0c03bc6bfd
Author:     John Baldwin <[email protected]>
AuthorDate: 2022-04-13 23:08:23 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2022-04-13 23:08:23 +0000

    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 46b3b9aa418f..9fd592f9647b 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)

Reply via email to