@@ -38,20 +38,20 @@ struct srcu_struct;
3838
3939#ifdef CONFIG_DEBUG_LOCK_ALLOC
4040
41- int __init_srcu_struct (struct srcu_struct * sp , const char * name ,
41+ int __init_srcu_struct (struct srcu_struct * ssp , const char * name ,
4242 struct lock_class_key * key );
4343
44- #define init_srcu_struct (sp ) \
44+ #define init_srcu_struct (ssp ) \
4545({ \
4646 static struct lock_class_key __srcu_key; \
4747 \
48- __init_srcu_struct((sp ), #sp , &__srcu_key); \
48+ __init_srcu_struct((ssp ), #ssp , &__srcu_key); \
4949})
5050
5151#define __SRCU_DEP_MAP_INIT (srcu_name ) .dep_map = { .name = #srcu_name },
5252#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
5353
54- int init_srcu_struct (struct srcu_struct * sp );
54+ int init_srcu_struct (struct srcu_struct * ssp );
5555
5656#define __SRCU_DEP_MAP_INIT (srcu_name )
5757#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
@@ -67,28 +67,28 @@ int init_srcu_struct(struct srcu_struct *sp);
6767struct srcu_struct { };
6868#endif
6969
70- void call_srcu (struct srcu_struct * sp , struct rcu_head * head ,
70+ void call_srcu (struct srcu_struct * ssp , struct rcu_head * head ,
7171 void (* func )(struct rcu_head * head ));
72- void _cleanup_srcu_struct (struct srcu_struct * sp , bool quiesced );
73- int __srcu_read_lock (struct srcu_struct * sp ) __acquires (sp );
74- void __srcu_read_unlock (struct srcu_struct * sp , int idx ) __releases (sp );
75- void synchronize_srcu (struct srcu_struct * sp );
72+ void _cleanup_srcu_struct (struct srcu_struct * ssp , bool quiesced );
73+ int __srcu_read_lock (struct srcu_struct * ssp ) __acquires (ssp );
74+ void __srcu_read_unlock (struct srcu_struct * ssp , int idx ) __releases (ssp );
75+ void synchronize_srcu (struct srcu_struct * ssp );
7676
7777/**
7878 * cleanup_srcu_struct - deconstruct a sleep-RCU structure
79- * @sp : structure to clean up.
79+ * @ssp : structure to clean up.
8080 *
8181 * Must invoke this after you are finished using a given srcu_struct that
8282 * was initialized via init_srcu_struct(), else you leak memory.
8383 */
84- static inline void cleanup_srcu_struct (struct srcu_struct * sp )
84+ static inline void cleanup_srcu_struct (struct srcu_struct * ssp )
8585{
86- _cleanup_srcu_struct (sp , false);
86+ _cleanup_srcu_struct (ssp , false);
8787}
8888
8989/**
9090 * cleanup_srcu_struct_quiesced - deconstruct a quiesced sleep-RCU structure
91- * @sp : structure to clean up.
91+ * @ssp : structure to clean up.
9292 *
9393 * Must invoke this after you are finished using a given srcu_struct that
9494 * was initialized via init_srcu_struct(), else you leak memory. Also,
@@ -103,16 +103,16 @@ static inline void cleanup_srcu_struct(struct srcu_struct *sp)
103103 * (with high probability, anyway), and will also cause the srcu_struct
104104 * to be leaked.
105105 */
106- static inline void cleanup_srcu_struct_quiesced (struct srcu_struct * sp )
106+ static inline void cleanup_srcu_struct_quiesced (struct srcu_struct * ssp )
107107{
108- _cleanup_srcu_struct (sp , true);
108+ _cleanup_srcu_struct (ssp , true);
109109}
110110
111111#ifdef CONFIG_DEBUG_LOCK_ALLOC
112112
113113/**
114114 * srcu_read_lock_held - might we be in SRCU read-side critical section?
115- * @sp : The srcu_struct structure to check
115+ * @ssp : The srcu_struct structure to check
116116 *
117117 * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU
118118 * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC,
@@ -126,16 +126,16 @@ static inline void cleanup_srcu_struct_quiesced(struct srcu_struct *sp)
126126 * relies on normal RCU, it can be called from the CPU which
127127 * is in the idle loop from an RCU point of view or offline.
128128 */
129- static inline int srcu_read_lock_held (const struct srcu_struct * sp )
129+ static inline int srcu_read_lock_held (const struct srcu_struct * ssp )
130130{
131131 if (!debug_lockdep_rcu_enabled ())
132132 return 1 ;
133- return lock_is_held (& sp -> dep_map );
133+ return lock_is_held (& ssp -> dep_map );
134134}
135135
136136#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
137137
138- static inline int srcu_read_lock_held (const struct srcu_struct * sp )
138+ static inline int srcu_read_lock_held (const struct srcu_struct * ssp )
139139{
140140 return 1 ;
141141}
@@ -145,7 +145,7 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp)
145145/**
146146 * srcu_dereference_check - fetch SRCU-protected pointer for later dereferencing
147147 * @p: the pointer to fetch and protect for later dereferencing
148- * @sp : pointer to the srcu_struct, which is used to check that we
148+ * @ssp : pointer to the srcu_struct, which is used to check that we
149149 * really are in an SRCU read-side critical section.
150150 * @c: condition to check for update-side use
151151 *
@@ -154,32 +154,32 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp)
154154 * to 1. The @c argument will normally be a logical expression containing
155155 * lockdep_is_held() calls.
156156 */
157- #define srcu_dereference_check (p , sp , c ) \
158- __rcu_dereference_check((p), (c) || srcu_read_lock_held(sp ), __rcu)
157+ #define srcu_dereference_check (p , ssp , c ) \
158+ __rcu_dereference_check((p), (c) || srcu_read_lock_held(ssp ), __rcu)
159159
160160/**
161161 * srcu_dereference - fetch SRCU-protected pointer for later dereferencing
162162 * @p: the pointer to fetch and protect for later dereferencing
163- * @sp : pointer to the srcu_struct, which is used to check that we
163+ * @ssp : pointer to the srcu_struct, which is used to check that we
164164 * really are in an SRCU read-side critical section.
165165 *
166166 * Makes rcu_dereference_check() do the dirty work. If PROVE_RCU
167167 * is enabled, invoking this outside of an RCU read-side critical
168168 * section will result in an RCU-lockdep splat.
169169 */
170- #define srcu_dereference (p , sp ) srcu_dereference_check((p), (sp ), 0)
170+ #define srcu_dereference (p , ssp ) srcu_dereference_check((p), (ssp ), 0)
171171
172172/**
173173 * srcu_dereference_notrace - no tracing and no lockdep calls from here
174174 * @p: the pointer to fetch and protect for later dereferencing
175- * @sp : pointer to the srcu_struct, which is used to check that we
175+ * @ssp : pointer to the srcu_struct, which is used to check that we
176176 * really are in an SRCU read-side critical section.
177177 */
178- #define srcu_dereference_notrace (p , sp ) srcu_dereference_check((p), (sp ), 1)
178+ #define srcu_dereference_notrace (p , ssp ) srcu_dereference_check((p), (ssp ), 1)
179179
180180/**
181181 * srcu_read_lock - register a new reader for an SRCU-protected structure.
182- * @sp : srcu_struct in which to register the new reader.
182+ * @ssp : srcu_struct in which to register the new reader.
183183 *
184184 * Enter an SRCU read-side critical section. Note that SRCU read-side
185185 * critical sections may be nested. However, it is illegal to
@@ -194,44 +194,44 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp)
194194 * srcu_read_unlock() in an irq handler if the matching srcu_read_lock()
195195 * was invoked in process context.
196196 */
197- static inline int srcu_read_lock (struct srcu_struct * sp ) __acquires (sp )
197+ static inline int srcu_read_lock (struct srcu_struct * ssp ) __acquires (ssp )
198198{
199199 int retval ;
200200
201- retval = __srcu_read_lock (sp );
202- rcu_lock_acquire (& (sp )-> dep_map );
201+ retval = __srcu_read_lock (ssp );
202+ rcu_lock_acquire (& (ssp )-> dep_map );
203203 return retval ;
204204}
205205
206206/* Used by tracing, cannot be traced and cannot invoke lockdep. */
207207static inline notrace int
208- srcu_read_lock_notrace (struct srcu_struct * sp ) __acquires (sp )
208+ srcu_read_lock_notrace (struct srcu_struct * ssp ) __acquires (ssp )
209209{
210210 int retval ;
211211
212- retval = __srcu_read_lock (sp );
212+ retval = __srcu_read_lock (ssp );
213213 return retval ;
214214}
215215
216216/**
217217 * srcu_read_unlock - unregister a old reader from an SRCU-protected structure.
218- * @sp : srcu_struct in which to unregister the old reader.
218+ * @ssp : srcu_struct in which to unregister the old reader.
219219 * @idx: return value from corresponding srcu_read_lock().
220220 *
221221 * Exit an SRCU read-side critical section.
222222 */
223- static inline void srcu_read_unlock (struct srcu_struct * sp , int idx )
224- __releases (sp )
223+ static inline void srcu_read_unlock (struct srcu_struct * ssp , int idx )
224+ __releases (ssp )
225225{
226- rcu_lock_release (& (sp )-> dep_map );
227- __srcu_read_unlock (sp , idx );
226+ rcu_lock_release (& (ssp )-> dep_map );
227+ __srcu_read_unlock (ssp , idx );
228228}
229229
230230/* Used by tracing, cannot be traced and cannot call lockdep. */
231231static inline notrace void
232- srcu_read_unlock_notrace (struct srcu_struct * sp , int idx ) __releases (sp )
232+ srcu_read_unlock_notrace (struct srcu_struct * ssp , int idx ) __releases (ssp )
233233{
234- __srcu_read_unlock (sp , idx );
234+ __srcu_read_unlock (ssp , idx );
235235}
236236
237237/**
0 commit comments