From: Peter Zijlstra <peterz@infradead.org>
Date: Thu, 23 Jul 2020 11:56:22 +0200
Subject: seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g
Patch-mainline: v5.9-rc1
Git-commit: e55687fe5c1e4849e5559a0a49199c9ca3fff36e
References: bsc#1176564 bsc#1162702
__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) <peterz@infradead.org>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
include/linux/seqlock.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -117,20 +117,20 @@ static inline void seqcount_lockdep_read
*/
#ifdef CONFIG_LOCKDEP
-#define __SEQ_LOCKDEP(expr) expr
+#define __SEQ_LOCK(expr) expr
#else
-#define __SEQ_LOCKDEP(expr)
+#define __SEQ_LOCK(expr)
#endif
#define SEQCOUNT_LOCKTYPE_ZERO(seq_name, assoc_lock) { \
.seqcount = SEQCNT_ZERO(seq_name.seqcount), \
- __SEQ_LOCKDEP(.lock = (assoc_lock)) \
+ __SEQ_LOCK(.lock = (assoc_lock)) \
}
#define seqcount_locktype_init(s, assoc_lock) \
do { \
seqcount_init(&(s)->seqcount); \
- __SEQ_LOCKDEP((s)->lock = (assoc_lock)); \
+ __SEQ_LOCK((s)->lock = (assoc_lock)); \
} while (0)
/**
@@ -145,7 +145,7 @@ do { \
*/
typedef struct seqcount_spinlock {
seqcount_t seqcount;
- __SEQ_LOCKDEP(spinlock_t *lock);
+ __SEQ_LOCK(spinlock_t *lock);
} seqcount_spinlock_t;
/**
@@ -176,7 +176,7 @@ typedef struct seqcount_spinlock {
*/
typedef struct seqcount_raw_spinlock {
seqcount_t seqcount;
- __SEQ_LOCKDEP(raw_spinlock_t *lock);
+ __SEQ_LOCK(raw_spinlock_t *lock);
} seqcount_raw_spinlock_t;
/**
@@ -207,7 +207,7 @@ typedef struct seqcount_raw_spinlock {
*/
typedef struct seqcount_rwlock {
seqcount_t seqcount;
- __SEQ_LOCKDEP(rwlock_t *lock);
+ __SEQ_LOCK(rwlock_t *lock);
} seqcount_rwlock_t;
/**
@@ -241,7 +241,7 @@ typedef struct seqcount_rwlock {
*/
typedef struct seqcount_mutex {
seqcount_t seqcount;
- __SEQ_LOCKDEP(struct mutex *lock);
+ __SEQ_LOCK(struct mutex *lock);
} seqcount_mutex_t;
/**
@@ -275,7 +275,7 @@ typedef struct seqcount_mutex {
*/
typedef struct seqcount_ww_mutex {
seqcount_t seqcount;
- __SEQ_LOCKDEP(struct ww_mutex *lock);
+ __SEQ_LOCK(struct ww_mutex *lock);
} seqcount_ww_mutex_t;
/**
@@ -313,7 +313,7 @@ static inline bool \
static inline void \
__seqcount_##locktype##_assert(seqcount_##locktype##_t *s) \
{ \
- __SEQ_LOCKDEP(lockdep_assert_held(lockmember)); \
+ __SEQ_LOCK(lockdep_assert_held(lockmember)); \
}
/*