locking/osq_lock: Clarify osq_wait_next() calling convention
authorDavid Laight <David.Laight@ACULAB.COM>
Fri, 29 Dec 2023 20:56:03 +0000 (20:56 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 30 Dec 2023 18:25:51 +0000 (10:25 -0800)
commit563adbfc351b2af9f1406b809ba60b9f1673a882
tree87fd8337c16d52d018244383e8b679864e443744
parent7c223098212957a1ecd8768e8e747ae2cf88e880
locking/osq_lock: Clarify osq_wait_next() calling convention

osq_wait_next() is passed 'prev' from osq_lock() and NULL from
osq_unlock() but only needs the 'cpu' value to write to lock->tail.

Just pass prev->cpu or OSQ_UNLOCKED_VAL instead.

Should have no effect on the generated code since gcc manages to assume
that 'prev != NULL' due to an earlier dereference.

Signed-off-by: David Laight <david.laight@aculab.com>
[ Changed 'old' to 'old_cpu' by request from Waiman Long  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/locking/osq_lock.c