History

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?

Peter Zijlstra committed 10 years ago

Commit 25528211 parent e6fd1fb8 files · +13 −18Browse files

Unified · Split

8 files
  1. drivers/acpi/processor_idle.c +2 −2
  2. drivers/xen/events/events_2l.c +3 −2
  3. kernel/locking/lockdep.c +1 −2
  4. kernel/rcu/rcutorture.c +2 −4
  5. kernel/workqueue.c +1 −2
  6. net/ipv4/syncookies.c +1 −2
  7. net/ipv6/syncookies.c +1 −2
  8. net/rds/page.c +2 −2
drivers/acpi/processor_idle.c+2−2
@@ -61,8 +61,8 @@ module_param(latency_factor, uint, 0644); · 60 unmodified lines
61 61
62static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);62static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);
63 63
64static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX],64static
65 acpi_cstate);65DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX], acpi_cstate);
66 66
67static int disabled_by_idle_boot_param(void)67static int disabled_by_idle_boot_param(void)
68{68{
drivers/xen/events/events_2l.c+3−2
@@ -38,8 +38,9 @@ · 37 unmodified lines
38/* Find the first set bit in a evtchn mask */38/* Find the first set bit in a evtchn mask */
39#define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)39#define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)
40 40
41static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD],41#define EVTCHN_MASK_SIZE (EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD)
42 cpu_evtchn_mask);42
43static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_MASK_SIZE], cpu_evtchn_mask);
43 44
44static unsigned evtchn_2l_max_channels(void)45static unsigned evtchn_2l_max_channels(void)
45{46{
kernel/locking/lockdep.c+1−2
@@ -148,8 +148,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock) · 147 unmodified lines
148}148}
149 149
150#ifdef CONFIG_LOCK_STAT150#ifdef CONFIG_LOCK_STAT
151static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS],151static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);
152 cpu_lock_stats);
153 152
154static inline u64 lockstat_clock(void)153static inline u64 lockstat_clock(void)
155{154{
kernel/rcu/rcutorture.c+2−4
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current; · 129 unmodified lines
130static unsigned long rcu_torture_current_version;130static unsigned long rcu_torture_current_version;
131static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];131static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
132static DEFINE_SPINLOCK(rcu_torture_lock);132static DEFINE_SPINLOCK(rcu_torture_lock);
133static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],133static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = { 0 };
134 rcu_torture_count) = { 0 };134static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) = { 0 };
135static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
136 rcu_torture_batch) = { 0 };
137static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];135static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
138static atomic_t n_rcu_torture_alloc;136static atomic_t n_rcu_torture_alloc;
139static atomic_t n_rcu_torture_alloc_fail;137static atomic_t n_rcu_torture_alloc_fail;
kernel/workqueue.c+1−2
@@ -320,8 +320,7 @@ static bool wq_debug_force_rr_cpu = false; · 319 unmodified lines
320module_param_named(debug_force_rr_cpu, wq_debug_force_rr_cpu, bool, 0644);320module_param_named(debug_force_rr_cpu, wq_debug_force_rr_cpu, bool, 0644);
321 321
322/* the per-cpu worker pools */322/* the per-cpu worker pools */
323static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],323static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS], cpu_worker_pools);
324 cpu_worker_pools);
325 324
326static DEFINE_IDR(worker_pool_idr); /* PR: idr of all pools */325static DEFINE_IDR(worker_pool_idr); /* PR: idr of all pools */
327 326
net/ipv4/syncookies.c+1−2
@@ -50,8 +50,7 @@ static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly; · 49 unmodified lines
50#define TSBITS 650#define TSBITS 6
51#define TSMASK (((__u32)1 << TSBITS) - 1)51#define TSMASK (((__u32)1 << TSBITS) - 1)
52 52
53static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],53static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS], ipv4_cookie_scratch);
54 ipv4_cookie_scratch);
55 54
56static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,55static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
57 u32 count, int c)56 u32 count, int c)
net/ipv6/syncookies.c+1−2
@@ -41,8 +41,7 @@ static __u16 const msstab[] = { · 40 unmodified lines
41 9000 - 60,41 9000 - 60,
42};42};
43 43
44static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],44static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS], ipv6_cookie_scratch);
45 ipv6_cookie_scratch);
46 45
47static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr,46static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr,
48 __be16 sport, __be16 dport, u32 count, int c)47 __be16 sport, __be16 dport, u32 count, int c)
net/rds/page.c+2−2
@@ -42,8 +42,8 @@ struct rds_page_remainder { · 41 unmodified lines
42 unsigned long r_offset;42 unsigned long r_offset;
43};43};
44 44
45static DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder,45static
46 rds_page_remainders);46DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder, rds_page_remainders);
47 47
48/*48/*
49 * returns 0 on success or -errno on failure.49 * returns 0 on success or -errno on failure.