linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix style issues in kernel/cpu.c
@ 2016-12-03  1:09 Thomas Casey
  2016-12-06 11:13 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Casey @ 2016-12-03  1:09 UTC (permalink / raw)
  To: tglx, bigeasy, anna-maria, peterz, linux; +Cc: linux-kernel

This patch fixes style issues in kernel/cpu.c such as wrapping an 80
character line, calling EXPORT_SYMBOL() immediately after a function is
defined, and whitespace and spacing issues.

Signed-off-by: Thomas Casey <tqcasey@gmail.com>
---
 kernel/cpu.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 29de1a9..15a90ba 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -228,7 +228,8 @@ static struct {
 	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
 	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),
+	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map",
+			&cpu_hotplug.dep_map),
 #endif
 };
 
@@ -304,7 +305,7 @@ void cpu_hotplug_begin(void)
 		mutex_lock(&cpu_hotplug.lock);
 		prepare_to_wait(&cpu_hotplug.wq, &wait, TASK_UNINTERRUPTIBLE);
 		if (likely(!atomic_read(&cpu_hotplug.refcount)))
-				break;
+			break;
 		mutex_unlock(&cpu_hotplug.lock);
 		schedule();
 	}
@@ -353,6 +354,7 @@ EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
 int register_cpu_notifier(struct notifier_block *nb)
 {
 	int ret;
+
 	cpu_maps_update_begin();
 	ret = raw_notifier_chain_register(&cpu_chain, nb);
 	cpu_maps_update_done();
@@ -363,6 +365,7 @@ int __register_cpu_notifier(struct notifier_block *nb)
 {
 	return raw_notifier_chain_register(&cpu_chain, nb);
 }
+EXPORT_SYMBOL(__register_cpu_notifier);
 
 static int __cpu_notify(unsigned long val, unsigned int cpu, int nr_to_call,
 			int *nr_calls)
@@ -661,7 +664,6 @@ void __init cpuhp_threads_init(void)
 
 #ifdef CONFIG_HOTPLUG_CPU
 EXPORT_SYMBOL(register_cpu_notifier);
-EXPORT_SYMBOL(__register_cpu_notifier);
 void unregister_cpu_notifier(struct notifier_block *nb)
 {
 	cpu_maps_update_begin();
@@ -1250,7 +1252,7 @@ static struct cpuhp_step cpuhp_bp_states[] = {
 		.teardown.single	= NULL,
 	},
 #ifdef CONFIG_SMP
-	[CPUHP_CREATE_THREADS]= {
+	[CPUHP_CREATE_THREADS] = {
 		.name			= "threads:prepare",
 		.startup.single		= smpboot_create_threads,
 		.teardown.single	= NULL,
@@ -1366,7 +1368,8 @@ static struct cpuhp_step cpuhp_ap_states[] = {
 		.teardown.single	= rcutree_dying_cpu,
 	},
 	/* Entry state on starting. Interrupts enabled from here on. Transient
-	 * state for synchronsization */
+	 * state for synchronsization
+	 */
 	[CPUHP_AP_ONLINE] = {
 		.name			= "ap:online",
 	},
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix style issues in kernel/cpu.c
  2016-12-03  1:09 [PATCH] Fix style issues in kernel/cpu.c Thomas Casey
@ 2016-12-06 11:13 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-12-06 11:13 UTC (permalink / raw)
  To: Thomas Casey; +Cc: tglx, anna-maria, peterz, linux, linux-kernel

On 2016-12-03 01:09:58 [+0000], Thomas Casey wrote:
> This patch fixes style issues in kernel/cpu.c such as wrapping an 80
> character line, calling EXPORT_SYMBOL() immediately after a function is
> defined, and whitespace and spacing issues.
> 
> Signed-off-by: Thomas Casey <tqcasey@gmail.com>

This is okay for most of it.

> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -353,6 +354,7 @@ EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
>  int register_cpu_notifier(struct notifier_block *nb)
>  {
>  	int ret;
> +
>  	cpu_maps_update_begin();
>  	ret = raw_notifier_chain_register(&cpu_chain, nb);
>  	cpu_maps_update_done();
> @@ -363,6 +365,7 @@ int __register_cpu_notifier(struct notifier_block *nb)
>  {
>  	return raw_notifier_chain_register(&cpu_chain, nb);
>  }
> +EXPORT_SYMBOL(__register_cpu_notifier);
>  
>  static int __cpu_notify(unsigned long val, unsigned int cpu, int nr_to_call,
>  			int *nr_calls)
> @@ -661,7 +664,6 @@ void __init cpuhp_threads_init(void)
>  
>  #ifdef CONFIG_HOTPLUG_CPU
>  EXPORT_SYMBOL(register_cpu_notifier);
> -EXPORT_SYMBOL(__register_cpu_notifier);
>  void unregister_cpu_notifier(struct notifier_block *nb)
>  {
>  	cpu_maps_update_begin();

I have a patch posted which gets rid of register_cpu_notifier() and
__register_cpu_notifier() so there is probably no point in fixing /
changing those.

Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-06 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03  1:09 [PATCH] Fix style issues in kernel/cpu.c Thomas Casey
2016-12-06 11:13 ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).