Skip to content

Commit 2552821

Browse files
Peter Zijlstratorvalds
authored andcommitted
tags: Fix DEFINE_PER_CPU expansions
$ make tags GEN tags ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name pattern "\1" ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name pattern "\1" ctags: Warning: kernel/locking/lockdep.c:151: null expansion of name pattern "\1" ctags: Warning: kernel/rcu/rcutorture.c:133: null expansion of name pattern "\1" ctags: Warning: kernel/rcu/rcutorture.c:135: null expansion of name pattern "\1" ctags: Warning: kernel/workqueue.c:323: null expansion of name pattern "\1" ctags: Warning: net/ipv4/syncookies.c:53: null expansion of name pattern "\1" ctags: Warning: net/ipv6/syncookies.c:44: null expansion of name pattern "\1" ctags: Warning: net/rds/page.c:45: null expansion of name pattern "\1" Which are all the result of the DEFINE_PER_CPU pattern: scripts/tags.sh:200: '/\<DEFINE_PER_CPU([^,]*, *\([[:alnum:]_]*\)/\1/v/' scripts/tags.sh:201: '/\<DEFINE_PER_CPU_SHARED_ALIGNED([^,]*, *\([[:alnum:]_]*\)/\1/v/' The below cures them. All except the workqueue one are within reasonable distance of the 80 char limit. TJ do you have any preference on how to fix the wq one, or shall we just not care its too long? Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Cc: Tejun Heo <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e6fd1fb commit 2552821

File tree

8 files changed

+13
-18
lines changed

8 files changed

+13
-18
lines changed

drivers/acpi/processor_idle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ module_param(latency_factor, uint, 0644);
6161

6262
static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);
6363

64-
static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX],
65-
acpi_cstate);
64+
static
65+
DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX], acpi_cstate);
6666

6767
static int disabled_by_idle_boot_param(void)
6868
{

drivers/xen/events/events_2l.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
/* Find the first set bit in a evtchn mask */
3939
#define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)
4040

41-
static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD],
42-
cpu_evtchn_mask);
41+
#define EVTCHN_MASK_SIZE (EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD)
42+
43+
static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_MASK_SIZE], cpu_evtchn_mask);
4344

4445
static unsigned evtchn_2l_max_channels(void)
4546
{

kernel/locking/lockdep.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
148148
}
149149

150150
#ifdef CONFIG_LOCK_STAT
151-
static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS],
152-
cpu_lock_stats);
151+
static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);
153152

154153
static inline u64 lockstat_clock(void)
155154
{

kernel/rcu/rcutorture.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current;
130130
static unsigned long rcu_torture_current_version;
131131
static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
132132
static DEFINE_SPINLOCK(rcu_torture_lock);
133-
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
134-
rcu_torture_count) = { 0 };
135-
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
136-
rcu_torture_batch) = { 0 };
133+
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = { 0 };
134+
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) = { 0 };
137135
static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
138136
static atomic_t n_rcu_torture_alloc;
139137
static atomic_t n_rcu_torture_alloc_fail;

kernel/workqueue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ static bool wq_debug_force_rr_cpu = false;
320320
module_param_named(debug_force_rr_cpu, wq_debug_force_rr_cpu, bool, 0644);
321321

322322
/* the per-cpu worker pools */
323-
static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
324-
cpu_worker_pools);
323+
static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS], cpu_worker_pools);
325324

326325
static DEFINE_IDR(worker_pool_idr); /* PR: idr of all pools */
327326

net/ipv4/syncookies.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
5050
#define TSBITS 6
5151
#define TSMASK (((__u32)1 << TSBITS) - 1)
5252

53-
static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],
54-
ipv4_cookie_scratch);
53+
static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS], ipv4_cookie_scratch);
5554

5655
static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
5756
u32 count, int c)

net/ipv6/syncookies.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ static __u16 const msstab[] = {
4141
9000 - 60,
4242
};
4343

44-
static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],
45-
ipv6_cookie_scratch);
44+
static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS], ipv6_cookie_scratch);
4645

4746
static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr,
4847
__be16 sport, __be16 dport, u32 count, int c)

net/rds/page.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ struct rds_page_remainder {
4242
unsigned long r_offset;
4343
};
4444

45-
static DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder,
46-
rds_page_remainders);
45+
static
46+
DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder, rds_page_remainders);
4747

4848
/*
4949
* returns 0 on success or -errno on failure.

0 commit comments

Comments
 (0)