Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636920 > unrolled thread
| Started by | Matej Dujava <mdujava@kocurkovo.cz> |
|---|---|
| First post | 2017-05-06 17:20 +0200 |
| Last post | 2017-05-06 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] kernel/cpu.c: fix many errors related to style. Matej Dujava <mdujava@kocurkovo.cz> - 2017-05-06 17:20 +0200
Re: [PATCH] kernel/cpu.c: fix many errors related to style. Joe Perches <joe@perches.com> - 2017-05-06 17:30 +0200
| From | Matej Dujava <mdujava@kocurkovo.cz> |
|---|---|
| Date | 2017-05-06 17:20 +0200 |
| Subject | [PATCH] kernel/cpu.c: fix many errors related to style. |
| Message-ID | <tE9EZ-1kH-3@gated-at.bofh.it> |
This patch fixes the checkpatch.pl warning:
ERROR: spaces required around that '=' (ctx:VxW)
WARNING: Block comments use a trailing */ on a separate line
CHECK: Please don't use multiple blank lines
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: braces {} should be used on all arms of this statement
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
---
kernel/cpu.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9ae6fbe5b5cf..ef3da68f2055 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -234,7 +234,6 @@ static struct {
#define cpuhp_lock_acquire() lock_map_acquire(&cpu_hotplug.dep_map)
#define cpuhp_lock_release() lock_map_release(&cpu_hotplug.dep_map)
-
void get_online_cpus(void)
{
might_sleep();
@@ -262,7 +261,6 @@ void put_online_cpus(void)
wake_up(&cpu_hotplug.wq);
cpuhp_lock_release();
-
}
EXPORT_SYMBOL_GPL(put_online_cpus);
@@ -1004,9 +1002,9 @@ int freeze_secondary_cpus(int primary)
trace_suspend_resume(TPS("CPU_OFF"), cpu, true);
error = _cpu_down(cpu, 1, CPUHP_OFFLINE);
trace_suspend_resume(TPS("CPU_OFF"), cpu, false);
- if (!error)
+ if (!error) {
cpumask_set_cpu(cpu, frozen_cpus);
- else {
+ } else {
pr_err("Error taking CPU%d down: %d\n", cpu, error);
break;
}
@@ -1110,7 +1108,6 @@ cpu_hotplug_pm_callback(struct notifier_block *nb,
return NOTIFY_OK;
}
-
static int __init cpu_hotplug_pm_sync_init(void)
{
/*
@@ -1137,7 +1134,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,
@@ -1241,8 +1238,10 @@ static struct cpuhp_step cpuhp_ap_states[] = {
.startup.single = NULL,
.teardown.single = rcutree_dying_cpu,
},
- /* Entry state on starting. Interrupts enabled from here on. Transient
- * state for synchronsization */
+ /*
+ * Entry state on starting. Interrupts enabled from here on. Transient
+ * state for synchronsization
+ */
[CPUHP_AP_ONLINE] = {
.name = "ap:online",
},
--
2.12.2
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-05-06 17:30 +0200 |
| Message-ID | <tE9OF-1nG-7@gated-at.bofh.it> |
| In reply to | #1636920 |
On Sat, 2017-05-06 at 17:09 +0200, Matej Dujava wrote:
> This patch fixes the checkpatch.pl warning:
> ERROR: spaces required around that '=' (ctx:VxW)
> WARNING: Block comments use a trailing */ on a separate line
> CHECK: Please don't use multiple blank lines
> CHECK: Blank lines aren't necessary before a close brace '}'
> CHECK: braces {} should be used on all arms of this statement
> CHECK: Blank lines aren't necessary after an open brace '{'
[]
> diff --git a/kernel/cpu.c b/kernel/cpu.c
Please don't modify core kernel files just to shut-up checkpatch
messages. If you are doing rework, it makes some sense, otherwise
it doesn't add much value.
> - /* Entry state on starting. Interrupts enabled from here on. Transient
> - * state for synchronsization */
> + /*
> + * Entry state on starting. Interrupts enabled from here on. Transient
> + * state for synchronsization
Fixing typos would be nicer than merely reformatting comments.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web