]> git.baikalelectronics.ru Git - kernel.git/commit
seqlock: Use unique prefix for seqcount_t property accessors
authorAhmed S. Darwish <a.darwish@linutronix.de>
Fri, 4 Sep 2020 15:32:28 +0000 (17:32 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 10 Sep 2020 09:19:30 +0000 (11:19 +0200)
commit1714b41be86bb364c4e928b7f685707b8a61c664
tree6200c2bb79c64dbec5c839944923e0d37402fdf3
parent890bbcedbf2b5cb3642e0e2a764d78dc4811a88f
seqlock: Use unique prefix for seqcount_t property accessors

At seqlock.h, the following set of functions:

    - __seqcount_ptr()
    - __seqcount_preemptible()
    - __seqcount_assert()

act as plain seqcount_t "property" accessors. Meanwhile, the following
group:

    - __seqcount_ptr()
    - __seqcount_lock_preemptible()
    - __seqcount_assert_lock_held()

act as the equivalent set, but in the generic form, taking either
seqcount_t or any of the seqcount_LOCKNAME_t variants.

This is quite confusing, especially the first member where it is called
exactly the same in both groups.

Differentiate the first group by using "__seqprop" as prefix, and also
use that same prefix for all of seqcount_LOCKNAME_t property accessors.

While at it, constify the property accessors first parameter when
appropriate.

References: a5f39e92ff77 ("seqlock: Extend seqcount API with associated locks")
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200904153231.11994-3-a.darwish@linutronix.de
include/linux/seqlock.h