diff options
author | Chun-Hung Tseng <henrybear327@gmail.com> | 2021-09-15 12:02:18 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-12-01 04:25:20 +0300 |
commit | 24ba53017e188e031f9cb8b290286fad52d2af00 (patch) | |
tree | 15790489bf7e8977f17fefd28d7c2fb9053c1f26 /include/linux/srcu.h | |
parent | 8c0abfd6d2f6b0221194241ac2908751a2a0385f (diff) | |
download | linux-24ba53017e188e031f9cb8b290286fad52d2af00.tar.xz |
rcu: Replace ________p1 and _________p1 with __UNIQUE_ID(rcu)
This commit replaces both ________p1 and _________p1 with __UNIQUE_ID(rcu),
and also adjusts the callers of the affected macros.
__UNIQUE_ID(rcu) will generate unique variable names during compilation,
which eliminates the need of ________p1 and _________p1 (both having 4
occurrences prior to the code change). This also avoids the variable
name shadowing issue, or at least makes those wishing to cause shadowing
problems work much harder to do so.
The same idea is used for the min/max macros (commit 589a978 and commit
e9092d0).
Signed-off-by: Jim Huang <jserv@ccns.ncku.edu.tw>
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index e6011a9975af..01226e4d960a 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -117,7 +117,8 @@ static inline int srcu_read_lock_held(const struct srcu_struct *ssp) * lockdep_is_held() calls. */ #define srcu_dereference_check(p, ssp, c) \ - __rcu_dereference_check((p), (c) || srcu_read_lock_held(ssp), __rcu) + __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ + (c) || srcu_read_lock_held(ssp), __rcu) /** * srcu_dereference - fetch SRCU-protected pointer for later dereferencing |