summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBoqun Feng <boqun@kernel.org>2026-08-04 09:14:31 -0700
committerPeter Zijlstra <peterz@infradead.org>2026-08-10 10:50:19 +0200
commit560fcaa92ef983315023eb4ebfc1ebae1132fb2a (patch)
tree93430b4f767717dac03e14b67769b389314deedb /lib
parentac4231a77973fc20808ed84c4af343eca2342d4b (diff)
sched: Avoid signed comparison of preempt_count() in __cant_migrate()
Currently preempt_count() is always a non-negative int on all archs (PREEMPT_NEED_RESCHED archs will mask out the MSB when returning preempt_count()), hence the checking in __cant_migrate() is in fact just checking whether preempt_count() is 0 or not. In a future change, we are going to use all the 32 bits of preempt_count(), which would make negative int values possible from preempt_count(). Therefore convert the "> 0" comparison into a zero check to prepare for the future change. No functional changes are intended. Signed-off-by: Boqun Feng <boqun@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260804161447.84806-10-boqun@kernel.org
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions