Commit ec8702da authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Peter Zijlstra

seqlock: Align multi-line macros newline escapes at 72 columns

Parent commit, "seqlock: Extend seqcount API with associated locks",
introduced a big number of multi-line macros that are newline-escaped
at 72 columns.

For overall cohesion, align the earlier-existing macros similarly.
Signed-off-by: default avatarAhmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200720155530.1173732-11-a.darwish@linutronix.de
parent 55f3560d
...@@ -80,17 +80,18 @@ static inline void __seqcount_init(seqcount_t *s, const char *name, ...@@ -80,17 +80,18 @@ static inline void __seqcount_init(seqcount_t *s, const char *name,
} }
#ifdef CONFIG_DEBUG_LOCK_ALLOC #ifdef CONFIG_DEBUG_LOCK_ALLOC
# define SEQCOUNT_DEP_MAP_INIT(lockname) \
.dep_map = { .name = #lockname } \ # define SEQCOUNT_DEP_MAP_INIT(lockname) \
.dep_map = { .name = #lockname }
/** /**
* seqcount_init() - runtime initializer for seqcount_t * seqcount_init() - runtime initializer for seqcount_t
* @s: Pointer to the seqcount_t instance * @s: Pointer to the seqcount_t instance
*/ */
# define seqcount_init(s) \ # define seqcount_init(s) \
do { \ do { \
static struct lock_class_key __key; \ static struct lock_class_key __key; \
__seqcount_init((s), #s, &__key); \ __seqcount_init((s), #s, &__key); \
} while (0) } while (0)
static inline void seqcount_lockdep_reader_access(const seqcount_t *s) static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
...@@ -842,20 +843,20 @@ typedef struct { ...@@ -842,20 +843,20 @@ typedef struct {
spinlock_t lock; spinlock_t lock;
} seqlock_t; } seqlock_t;
#define __SEQLOCK_UNLOCKED(lockname) \ #define __SEQLOCK_UNLOCKED(lockname) \
{ \ { \
.seqcount = SEQCNT_ZERO(lockname), \ .seqcount = SEQCNT_ZERO(lockname), \
.lock = __SPIN_LOCK_UNLOCKED(lockname) \ .lock = __SPIN_LOCK_UNLOCKED(lockname) \
} }
/** /**
* seqlock_init() - dynamic initializer for seqlock_t * seqlock_init() - dynamic initializer for seqlock_t
* @sl: Pointer to the seqlock_t instance * @sl: Pointer to the seqlock_t instance
*/ */
#define seqlock_init(sl) \ #define seqlock_init(sl) \
do { \ do { \
seqcount_init(&(sl)->seqcount); \ seqcount_init(&(sl)->seqcount); \
spin_lock_init(&(sl)->lock); \ spin_lock_init(&(sl)->lock); \
} while (0) } while (0)
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment