OSDN Git Service

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)
commit5cdd25572a29e46f932d3e6eedbd07429de66431
tree6200c2bb79c64dbec5c839944923e0d37402fdf3
parent6dd699b13d53f26a7603702d8bada3482312df74
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: 55f3560df975 ("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