* [PATCH 2/2] kernel/stop_machine.c: remove false assignment to static
@ 2014-05-07 20:46 Fabian Frederick
2014-05-07 21:04 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2014-05-07 20:46 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Peter Zijlstra
This patch also fixes function prototype over 80 characters
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
kernel/stop_machine.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 695f0c6..8d29ee2 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -42,7 +42,7 @@ struct cpu_stopper {
static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
static DEFINE_PER_CPU(struct task_struct *, cpu_stopper_task);
-static bool stop_machine_initialized = false;
+static bool stop_machine_initialized;
/*
* Avoids a race between stop_two_cpus and global stop_cpus, where
@@ -241,7 +241,8 @@ static void irq_cpu_stop_queue_work(void *arg)
*
* returns when both are completed.
*/
-int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
+int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn,
+ void *arg)
{
struct cpu_stop_done done;
struct cpu_stop_work work1, work2;
--
1.8.4.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] kernel/stop_machine.c: remove false assignment to static
2014-05-07 20:46 [PATCH 2/2] kernel/stop_machine.c: remove false assignment to static Fabian Frederick
@ 2014-05-07 21:04 ` Peter Zijlstra
2014-05-08 5:07 ` Fabian Frederick
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2014-05-07 21:04 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, akpm
On Wed, May 07, 2014 at 10:46:56PM +0200, Fabian Frederick wrote:
> This patch also fixes function prototype over 80 characters
And does it wrong.. Also does it really matter to GCC that we init the
bool? Surely it can see its 0 and put it in .bss anyway?
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> kernel/stop_machine.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> index 695f0c6..8d29ee2 100644
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -42,7 +42,7 @@ struct cpu_stopper {
>
> static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
> static DEFINE_PER_CPU(struct task_struct *, cpu_stopper_task);
> -static bool stop_machine_initialized = false;
> +static bool stop_machine_initialized;
>
> /*
> * Avoids a race between stop_two_cpus and global stop_cpus, where
> @@ -241,7 +241,8 @@ static void irq_cpu_stop_queue_work(void *arg)
> *
> * returns when both are completed.
> */
> -int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
> +int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn,
> + void *arg)
Its only 84, so I didn't care to wrap it, its more readable this way,
but if you want it split split it like:
int
stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
Or if you really have to split arguments to it in groups that make
sense; like:
int stop_two_cpus(unsigned int cpu1, unsigned int cpu2,
cpu_stop_fn_t fn, void *arg)
But really, these are two unrelated changes, and should therefore not be
in a single patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] kernel/stop_machine.c: remove false assignment to static
2014-05-07 21:04 ` Peter Zijlstra
@ 2014-05-08 5:07 ` Fabian Frederick
0 siblings, 0 replies; 3+ messages in thread
From: Fabian Frederick @ 2014-05-08 5:07 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: linux-kernel, akpm
On Wed, 7 May 2014 23:04:11 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, May 07, 2014 at 10:46:56PM +0200, Fabian Frederick wrote:
> > This patch also fixes function prototype over 80 characters
>
> And does it wrong.. Also does it really matter to GCC that we init the
> bool? Surely it can see its 0 and put it in .bss anyway?
It's considered redundant but maintainer's choice is the priority :)
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > ---
> > kernel/stop_machine.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> > index 695f0c6..8d29ee2 100644
> > --- a/kernel/stop_machine.c
> > +++ b/kernel/stop_machine.c
> > @@ -42,7 +42,7 @@ struct cpu_stopper {
> >
> > static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
> > static DEFINE_PER_CPU(struct task_struct *, cpu_stopper_task);
> > -static bool stop_machine_initialized = false;
> > +static bool stop_machine_initialized;
> >
> > /*
> > * Avoids a race between stop_two_cpus and global stop_cpus, where
> > @@ -241,7 +241,8 @@ static void irq_cpu_stop_queue_work(void *arg)
> > *
> > * returns when both are completed.
> > */
> > -int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
> > +int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn,
> > + void *arg)
>
> Its only 84, so I didn't care to wrap it, its more readable this way,
> but if you want it split split it like:
>
> int
> stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
>
> Or if you really have to split arguments to it in groups that make
> sense; like:
>
> int stop_two_cpus(unsigned int cpu1, unsigned int cpu2,
> cpu_stop_fn_t fn, void *arg)
>
> But really, these are two unrelated changes, and should therefore not be
> in a single patch.
Ok, thanks
Fabian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-08 5:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 20:46 [PATCH 2/2] kernel/stop_machine.c: remove false assignment to static Fabian Frederick
2014-05-07 21:04 ` Peter Zijlstra
2014-05-08 5:07 ` Fabian Frederick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®