Skip to content

Commit e55687f

Browse files
author
Peter Zijlstra
committed
seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g
__SEQ_LOCKDEP() is an expression gate for the seqcount_LOCKNAME_t::lock member. Rename it to be about the member, not the gate condition. Later (PREEMPT_RT) patches will make the member available for !LOCKDEP configs. Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
1 parent af5a06b commit e55687f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/linux/seqlock.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,20 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
133133
*/
134134

135135
#ifdef CONFIG_LOCKDEP
136-
#define __SEQ_LOCKDEP(expr) expr
136+
#define __SEQ_LOCK(expr) expr
137137
#else
138-
#define __SEQ_LOCKDEP(expr)
138+
#define __SEQ_LOCK(expr)
139139
#endif
140140

141141
#define SEQCOUNT_LOCKTYPE_ZERO(seq_name, assoc_lock) { \
142142
.seqcount = SEQCNT_ZERO(seq_name.seqcount), \
143-
__SEQ_LOCKDEP(.lock = (assoc_lock)) \
143+
__SEQ_LOCK(.lock = (assoc_lock)) \
144144
}
145145

146146
#define seqcount_locktype_init(s, assoc_lock) \
147147
do { \
148148
seqcount_init(&(s)->seqcount); \
149-
__SEQ_LOCKDEP((s)->lock = (assoc_lock)); \
149+
__SEQ_LOCK((s)->lock = (assoc_lock)); \
150150
} while (0)
151151

152152
/**
@@ -161,7 +161,7 @@ do { \
161161
*/
162162
typedef struct seqcount_spinlock {
163163
seqcount_t seqcount;
164-
__SEQ_LOCKDEP(spinlock_t *lock);
164+
__SEQ_LOCK(spinlock_t *lock);
165165
} seqcount_spinlock_t;
166166

167167
/**
@@ -192,7 +192,7 @@ typedef struct seqcount_spinlock {
192192
*/
193193
typedef struct seqcount_raw_spinlock {
194194
seqcount_t seqcount;
195-
__SEQ_LOCKDEP(raw_spinlock_t *lock);
195+
__SEQ_LOCK(raw_spinlock_t *lock);
196196
} seqcount_raw_spinlock_t;
197197

198198
/**
@@ -223,7 +223,7 @@ typedef struct seqcount_raw_spinlock {
223223
*/
224224
typedef struct seqcount_rwlock {
225225
seqcount_t seqcount;
226-
__SEQ_LOCKDEP(rwlock_t *lock);
226+
__SEQ_LOCK(rwlock_t *lock);
227227
} seqcount_rwlock_t;
228228

229229
/**
@@ -257,7 +257,7 @@ typedef struct seqcount_rwlock {
257257
*/
258258
typedef struct seqcount_mutex {
259259
seqcount_t seqcount;
260-
__SEQ_LOCKDEP(struct mutex *lock);
260+
__SEQ_LOCK(struct mutex *lock);
261261
} seqcount_mutex_t;
262262

263263
/**
@@ -291,7 +291,7 @@ typedef struct seqcount_mutex {
291291
*/
292292
typedef struct seqcount_ww_mutex {
293293
seqcount_t seqcount;
294-
__SEQ_LOCKDEP(struct ww_mutex *lock);
294+
__SEQ_LOCK(struct ww_mutex *lock);
295295
} seqcount_ww_mutex_t;
296296

297297
/**
@@ -329,7 +329,7 @@ __seqcount_##locktype##_preemptible(seqcount_##locktype##_t *s) \
329329
static inline void \
330330
__seqcount_##locktype##_assert(seqcount_##locktype##_t *s) \
331331
{ \
332-
__SEQ_LOCKDEP(lockdep_assert_held(lockmember)); \
332+
__SEQ_LOCK(lockdep_assert_held(lockmember)); \
333333
}
334334

335335
/*

0 commit comments

Comments
 (0)