Re: [PATCH] kernel/cpu.c: Fix many errors related to style.

From: Jesper Juhl
Date: Sat Jan 29 2011 - 16:31:09 EST


On Sat, 29 Jan 2011, Michael Rodriguez wrote:

> This patch changes the printk() calls to have the KERN_INFO/KERN_ERROR stuff,
> and fixes other coding style errors. Not _all_ of them are gone, though.
>
> Signed-off-by: Michael Rodriguez <dkingston02@xxxxxxxxx>
> ---
> kernel/cpu.c | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
...
> @@ -201,11 +200,11 @@ static int __ref take_cpu_down(void *_param)
>
> /* Ensure this CPU doesn't handle any more interrupts. */
> err = __cpu_disable();
> +
> if (err < 0)
> return err;
Why? We set 'err', then we test 'err' - why do we need a blank line
between those two? It's not like you are sepperating two logically
different operations from eachother here...

...
> @@ -227,7 +226,9 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
> return -EINVAL;
>
> cpu_hotplug_begin();
> +
> err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls);
> +
> if (err) {
> nr_calls--;
> __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL);

Why would we want these extra newlines? What's the point? The opereations
fit nicely together, I don't see the point in adding these extra
newlines..


--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/