locking/seqlock: Simplify SEQCOUNT_LOCKNAME()
authorOleg Nesterov <oleg@redhat.com>
Thu, 12 Oct 2023 14:31:58 +0000 (16:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 12 Oct 2023 18:18:20 +0000 (20:18 +0200)
commitf995443f01b4dbcce723539b99050ce69b319e58
treeb7a609cb0f6aefcf7ac3ad218afa2ca691ac188a
parent4fbf8b136ded943f8661cf48270482ad1f5ce7bd
locking/seqlock: Simplify SEQCOUNT_LOCKNAME()

1. Kill the "lockmember" argument. It is always s->lock plus
   __seqprop_##lockname##_sequence() already uses s->lock and
   ignores "lockmember".

2. Kill the "lock_acquire" argument. __seqprop_##lockname##_sequence()
   can use the same "lockbase" prefix for _lock and _unlock.

Apart from line numbers, gcc -E outputs the same code.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/20231012143158.GA16133@redhat.com
include/linux/seqlock.h