Re: [PATCH v2 05/11] Kbuild: don't add obj tree in additional includes

2016-07-18 Thread Michal Marek
On Wed, Jun 15, 2016 at 05:45:47PM +0200, Arnd Bergmann wrote:
> When building with separate object directories and driver specific
> Makefiles that add additional header include paths, Kbuild adjusts
> the gcc flags so that we include both the directory in the source
> tree and in the object tree.
> 
> However, due to another bug I fixed earlier, this did not actually
> include the correct directory in the object tree, so we know that
> we only really need the source tree here. Also, including the
> object tree sometimes causes warnings about nonexisting directories
> when the include path only exists in the source.
> 
> This changes the logic to only emit the -I argument for the srctree,
> not for objects. We still need both $(srctree)/$(src) and $(obj)
> though, so I'm adding them manually.
> 
> Signed-off-by: Arnd Bergmann 

Hi Arnd,

I applied the series up to this patch to kbuild.git#kbuild. The rest
seem to be related but not dependent patches, so I'll leave it up to the
respective maintainers to pick them up. Is that OK with you?

Thanks,
Michal


[PATCH v3] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2016-03-01 Thread Michal Marek
Both Emacs etags and Exuberant ctags allow to specify regexp
replacements to help the tools understand some constructs used in the
source code. We use these replacements extensively in make tags,
however, the rules have some limitations, one of them being that they
only match single lines. Luckily, ctags prints a warning if a rule
seems to match except for the identifier we are looking for:

ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern "\1"
ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name 
pattern "\1"
ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name 
pattern "\1"
ctags: Warning: kernel/workqueue.c:307: 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/locking/lockdep.c:153: null expansion of name pattern 
"\1"
ctags: Warning: net/rds/page.c:45: null expansion of name pattern "\1"
ctags: Warning: net/ipv6/syncookies.c:44: null expansion of name pattern "\1"
ctags: Warning: net/ipv4/syncookies.c:53: null expansion of name pattern "\1"

This patch removes the newlines in the DEFINE_PER_CPU, so that the
respective per-cpu variable definitions can be indexed.

Signed-off-by: Michal Marek <mma...@suse.com>
---
v2->v3: Rebased and improved changelog.

---
 arch/ia64/kernel/smp.c | 3 +--
 drivers/acpi/processor_idle.c  | 3 +--
 drivers/xen/events/events_2l.c | 3 +--
 kernel/locking/lockdep.c   | 3 +--
 kernel/rcu/rcutorture.c| 6 ++
 kernel/workqueue.c | 3 +--
 net/ipv4/syncookies.c  | 3 +--
 net/ipv6/syncookies.c  | 3 +--
 net/rds/page.c | 3 +--
 9 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 7f706d4f84f7..1dcfe29d8a42 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -57,8 +57,7 @@ static struct local_tlb_flush_counts {
unsigned int count;
 } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS];
 
-static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS],
-shadow_flush_counts);
+static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS], 
shadow_flush_counts);
 
 #define IPI_CALL_FUNC  0
 #define IPI_CPU_STOP   1
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 175c86bee3a9..16ca18547370 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -61,8 +61,7 @@ module_param(latency_factor, uint, 0644);
 
 static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);
 
-static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX],
-   acpi_cstate);
+static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX], 
acpi_cstate);
 
 static int disabled_by_idle_boot_param(void)
 {
diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c
index 7dd46312c180..7ffed4c62434 100644
--- a/drivers/xen/events/events_2l.c
+++ b/drivers/xen/events/events_2l.c
@@ -38,8 +38,7 @@
 /* Find the first set bit in a evtchn mask */
 #define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)
 
-static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD],
- cpu_evtchn_mask);
+static DEFINE_PER_CPU(xen_ulong_t 
[EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD], cpu_evtchn_mask);
 
 static unsigned evtchn_2l_max_channels(void)
 {
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 60ace56618f6..96e5300fdf4b 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -150,8 +150,7 @@ static inline struct lock_class *hlock_class(struct 
held_lock *hlock)
 }
 
 #ifdef CONFIG_LOCK_STAT
-static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS],
- cpu_lock_stats);
+static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], 
cpu_lock_stats);
 
 static inline u64 lockstat_clock(void)
 {
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index d2988d047d66..4d5cc6aa7e1e 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current;
 static unsigned long rcu_torture_current_version;
 static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
 static DEFINE_SPINLOCK(rcu_torture_lock);
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_count) = { 0 };
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_batch) = { 0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = { 
0 };
+static

Re: [PATCH v2 8/8] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-12-07 Thread Michal Marek
On 2015-12-07 17:33, David Laight wrote:
> From: Michal Marek
>> Sent: 04 December 2015 15:26
>> Otherwise make tags can't parse them:
>>
>> ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern 
>> "\1"
> ...
> 
> Seems to me you need to fix ctags.

I'm sure the maintainers of ctags and etags would accept patches to
describe a custom context-free grammar via commandline options, but
until then, let's continue using the regular expressions in tags.sh and
remove newlines in macros that tags.sh is trying to expand.

Michal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 8/8] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-12-07 Thread Michal Marek
On 2015-12-07 18:04, Joe Perches wrote:
> On Mon, 2015-12-07 at 17:53 +0100, Michal Marek wrote:
>> On 2015-12-07 17:33, David Laight wrote:
>>> From: Michal Marek
>>>> Sent: 04 December 2015 15:26
>>>> Otherwise make tags can't parse them:
>>>>
>>>> ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern 
>>>> "\1"
>>> ...
>>>
>>> Seems to me you need to fix ctags.
>>
>> I'm sure the maintainers of ctags and etags would accept patches to
>> describe a custom context-free grammar via commandline options, but
>> until then, let's continue using the regular expressions in tags.sh and
>> remove newlines in macros that tags.sh is trying to expand.
>>
> 
> Do you have a list of the most common macros?

In practice, it's only DEFINE_PER_CPU and its sibling
DEFINE_PER_CPU_SHARED_ALIGNED, where we try to pick the second argument
to the macro and the first argument can be lengthy.


> Perhaps it'd be good to add exceptions to checkpatch
> 80 column line rules for them.

Your call. But this is a fairly rare occurrence -- 10 cases so far.

Michal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 8/8] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-12-04 Thread Michal Marek
Otherwise make tags can't parse them:

ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern "\1"
ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name 
pattern "\1"
ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name 
pattern "\1"
ctags: Warning: kernel/locking/lockdep.c:153: null expansion of name pattern 
"\1"
ctags: Warning: kernel/workqueue.c:305: 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: net/rds/page.c:45: 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"

Cc: linux-i...@vger.kernel.org
Cc: xen-de...@lists.xenproject.org
Cc: linux-a...@vger.kernel.org
Cc: rds-de...@oss.oracle.com
Cc: netdev@vger.kernel.org
Signed-off-by: Michal Marek <mma...@suse.com>
---
v2: No change

 arch/ia64/kernel/smp.c | 3 +--
 drivers/acpi/processor_idle.c  | 3 +--
 drivers/xen/events/events_2l.c | 3 +--
 kernel/locking/lockdep.c   | 3 +--
 kernel/rcu/rcutorture.c| 6 ++
 kernel/workqueue.c | 3 +--
 net/ipv4/syncookies.c  | 3 +--
 net/ipv6/syncookies.c  | 3 +--
 net/rds/page.c | 3 +--
 9 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 7f706d4f84f7..1dcfe29d8a42 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -57,8 +57,7 @@ static struct local_tlb_flush_counts {
unsigned int count;
 } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS];
 
-static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS],
-shadow_flush_counts);
+static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS], 
shadow_flush_counts);
 
 #define IPI_CALL_FUNC  0
 #define IPI_CPU_STOP   1
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 175c86bee3a9..16ca18547370 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -61,8 +61,7 @@ module_param(latency_factor, uint, 0644);
 
 static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);
 
-static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX],
-   acpi_cstate);
+static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX], 
acpi_cstate);
 
 static int disabled_by_idle_boot_param(void)
 {
diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c
index 7dd46312c180..7ffed4c62434 100644
--- a/drivers/xen/events/events_2l.c
+++ b/drivers/xen/events/events_2l.c
@@ -38,8 +38,7 @@
 /* Find the first set bit in a evtchn mask */
 #define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)
 
-static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD],
- cpu_evtchn_mask);
+static DEFINE_PER_CPU(xen_ulong_t 
[EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD], cpu_evtchn_mask);
 
 static unsigned evtchn_2l_max_channels(void)
 {
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 60ace56618f6..96e5300fdf4b 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -150,8 +150,7 @@ static inline struct lock_class *hlock_class(struct 
held_lock *hlock)
 }
 
 #ifdef CONFIG_LOCK_STAT
-static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS],
- cpu_lock_stats);
+static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], 
cpu_lock_stats);
 
 static inline u64 lockstat_clock(void)
 {
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index adbb194e2b5d..3504c6e5b641 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current;
 static unsigned long rcu_torture_current_version;
 static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
 static DEFINE_SPINLOCK(rcu_torture_lock);
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_count) = { 0 };
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_batch) = { 0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = { 
0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) = { 
0 };
 static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
 static atomic_t n_rcu_torture_alloc;
 static atomic_t n_rcu_torture_alloc_fail;
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c579dbab2e36..4111c5b9ba0c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -302,8 +30

Re: [PATCH 9/9] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-10-22 Thread Michal Marek
On 2015-10-22 13:31, Prarit Bhargava wrote:
> 
> 
> On 10/21/2015 03:52 PM, Michal Marek wrote:
>> Dne 21.10.2015 v 21:27 Prarit Bhargava napsal(a):
>>> On 10/15/2015 04:16 PM, Michal Marek wrote:
>>>> Otherwise make tags can't parse them:
>>>>
>>>> ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern 
>>>> "\1"
>>>> ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name 
>>>> pattern "\1"
>>>> ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name 
>>>> pattern "\1"
>>>> ctags: Warning: kernel/locking/lockdep.c:153: null expansion of name 
>>>> pattern "\1"
>>>> ctags: Warning: kernel/workqueue.c:305: 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: net/rds/page.c:45: 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"
>>>
>>> I guarantee you're going to end up fixing this issue over and over again as 
>>> more
>>> code is added in.
>>
>> This is certainly going to happen, but it should be quickly spotted by
>> anybody running make tags on linux-next. And 10 instances since the
>> beginning of git is not too many.
> 
> Not everyone uses 'make tags'.  'make cscope' exists and functions correctly 
> ;)

cscope works, but unfortunately it cannot be extended to understand the
preprocessor constructs. But it does not suffer from the problem at
hand, obviously.


>> It's not ctags itself parsing the DEFINE_PER_CPU() macro, but a
>> user-supplied regex specified on commandline. Which can only operate on
>> single lines.
>>
> 
> What's the regex?

See
https://lkml.kernel.org/r/1444940195-28272-9-git-send-email-mma...@suse.com

It used to require a closing parenthesis, so it would not match the
multiline macro invocations at all. Now it matches them, but ctags
correctly warns that the empty string is probably not what we intended
to match.

Michal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/9] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-10-22 Thread Michal Marek
On 2015-10-22 14:14, Prarit Bhargava wrote:
> On 10/22/2015 08:06 AM, Michal Marek wrote:
>> It used to require a closing parenthesis, so it would not match the
>> multiline macro invocations at all. Now it matches them, but ctags
>> correctly warns that the empty string is probably not what we intended
>> to match.
> 
> It seems wrong to change kernel code, not for a bug, but for a userspace 
> search.

The bug is that the code cannot be indexed using ctags or etags.

Michal

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/9] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-10-21 Thread Michal Marek
Dne 21.10.2015 v 21:27 Prarit Bhargava napsal(a):
> On 10/15/2015 04:16 PM, Michal Marek wrote:
>> Otherwise make tags can't parse them:
>>
>> ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern 
>> "\1"
>> ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name 
>> pattern "\1"
>> ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name 
>> pattern "\1"
>> ctags: Warning: kernel/locking/lockdep.c:153: null expansion of name pattern 
>> "\1"
>> ctags: Warning: kernel/workqueue.c:305: 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: net/rds/page.c:45: 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"
> 
> I guarantee you're going to end up fixing this issue over and over again as 
> more
> code is added in.

This is certainly going to happen, but it should be quickly spotted by
anybody running make tags on linux-next. And 10 instances since the
beginning of git is not too many.


> OOC, why not fix ctags to recognize newlines?

It's not ctags itself parsing the DEFINE_PER_CPU() macro, but a
user-supplied regex specified on commandline. Which can only operate on
single lines.

Michal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 9/9] treewide: Remove newlines inside DEFINE_PER_CPU() macros

2015-10-15 Thread Michal Marek
Otherwise make tags can't parse them:

ctags: Warning: arch/ia64/kernel/smp.c:60: null expansion of name pattern "\1"
ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name 
pattern "\1"
ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name 
pattern "\1"
ctags: Warning: kernel/locking/lockdep.c:153: null expansion of name pattern 
"\1"
ctags: Warning: kernel/workqueue.c:305: 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: net/rds/page.c:45: 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"

Cc: linux-i...@vger.kernel.org
Cc: xen-de...@lists.xenproject.org
Cc: linux-a...@vger.kernel.org
Cc: rds-de...@oss.oracle.com
Cc: netdev@vger.kernel.org
Signed-off-by: Michal Marek <mma...@suse.com>
---
 arch/ia64/kernel/smp.c | 3 +--
 drivers/acpi/processor_idle.c  | 3 +--
 drivers/xen/events/events_2l.c | 3 +--
 kernel/locking/lockdep.c   | 3 +--
 kernel/rcu/rcutorture.c| 6 ++
 kernel/workqueue.c | 3 +--
 net/ipv4/syncookies.c  | 3 +--
 net/ipv6/syncookies.c  | 3 +--
 net/rds/page.c | 3 +--
 9 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 7f706d4f84f7..1dcfe29d8a42 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -57,8 +57,7 @@ static struct local_tlb_flush_counts {
unsigned int count;
 } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS];
 
-static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS],
-shadow_flush_counts);
+static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS], 
shadow_flush_counts);
 
 #define IPI_CALL_FUNC  0
 #define IPI_CPU_STOP   1
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 175c86bee3a9..16ca18547370 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -61,8 +61,7 @@ module_param(latency_factor, uint, 0644);
 
 static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device);
 
-static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX],
-   acpi_cstate);
+static DEFINE_PER_CPU(struct acpi_processor_cx * [CPUIDLE_STATE_MAX], 
acpi_cstate);
 
 static int disabled_by_idle_boot_param(void)
 {
diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c
index 7dd46312c180..7ffed4c62434 100644
--- a/drivers/xen/events/events_2l.c
+++ b/drivers/xen/events/events_2l.c
@@ -38,8 +38,7 @@
 /* Find the first set bit in a evtchn mask */
 #define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD)
 
-static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD],
- cpu_evtchn_mask);
+static DEFINE_PER_CPU(xen_ulong_t 
[EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD], cpu_evtchn_mask);
 
 static unsigned evtchn_2l_max_channels(void)
 {
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 8acfbf773e06..3b44d89faa48 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -150,8 +150,7 @@ static inline struct lock_class *hlock_class(struct 
held_lock *hlock)
 }
 
 #ifdef CONFIG_LOCK_STAT
-static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS],
- cpu_lock_stats);
+static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], 
cpu_lock_stats);
 
 static inline u64 lockstat_clock(void)
 {
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 77192953dee5..588bc3374602 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current;
 static unsigned long rcu_torture_current_version;
 static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
 static DEFINE_SPINLOCK(rcu_torture_lock);
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_count) = { 0 };
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_batch) = { 0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = { 
0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) = { 
0 };
 static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
 static atomic_t n_rcu_torture_alloc;
 static atomic_t n_rcu_torture_alloc_fail;
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ca71582fcfab..b800c945e10b 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -302,8 +30