Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Vincent Guittot
On Mon, 10 Sep 2018 at 12:32, Miguel Ojeda wrote: > > Hi Vincent, > > On Mon, Sep 10, 2018 at 9:00 AM, Vincent Guittot > wrote: > > On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda > > wrote: > >> > >> On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > >> > On Sun, Sep 09, 2018 at 06:36:01PM

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Vincent Guittot
On Mon, 10 Sep 2018 at 12:32, Miguel Ojeda wrote: > > Hi Vincent, > > On Mon, Sep 10, 2018 at 9:00 AM, Vincent Guittot > wrote: > > On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda > > wrote: > >> > >> On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > >> > On Sun, Sep 09, 2018 at 06:36:01PM

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Miguel Ojeda
Hi Vincent, On Mon, Sep 10, 2018 at 9:00 AM, Vincent Guittot wrote: > On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda > wrote: >> >> On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: >> > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: >> >> No, you get a different warning

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Miguel Ojeda
Hi Vincent, On Mon, Sep 10, 2018 at 9:00 AM, Vincent Guittot wrote: > On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda > wrote: >> >> On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: >> > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: >> >> No, you get a different warning

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Vincent Guittot
On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda wrote: > > On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: > >> No, you get a different warning depending on whether you have enabled > >> CONFIG_PARAVIRT_TIME_ACCOUNTING or

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-10 Thread Vincent Guittot
On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda wrote: > > On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: > >> No, you get a different warning depending on whether you have enabled > >> CONFIG_PARAVIRT_TIME_ACCOUNTING or

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: >> No, you get a different warning depending on whether you have enabled >> CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING. > > Ok. > > Still, adding

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov wrote: > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: >> No, you get a different warning depending on whether you have enabled >> CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING. > > Ok. > > Still, adding

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: > No, you get a different warning depending on whether you have enabled > CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING. Ok. Still, adding __maybe_unused to both (or writing it before the name, whatever works!) and

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote: > No, you get a different warning depending on whether you have enabled > CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING. Ok. Still, adding __maybe_unused to both (or writing it before the name, whatever works!) and

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
Hi Borislav, On Sun, Sep 9, 2018 at 6:06 PM, Borislav Petkov wrote: > On Sun, Sep 09, 2018 at 04:48:19PM +0200, Miguel Ojeda wrote: >> Indeed. But note that the attribute needs to be written before the >> variable name so that it applies to both variables (or write it twice) > > It warns only

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
Hi Borislav, On Sun, Sep 9, 2018 at 6:06 PM, Borislav Petkov wrote: > On Sun, Sep 09, 2018 at 04:48:19PM +0200, Miguel Ojeda wrote: >> Indeed. But note that the attribute needs to be written before the >> variable name so that it applies to both variables (or write it twice) > > It warns only

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sun, Sep 09, 2018 at 04:48:19PM +0200, Miguel Ojeda wrote: > Indeed. But note that the attribute needs to be written before the > variable name so that it applies to both variables (or write it twice) It warns only about 'steal' - not the other one. > Also, if we go that route, I would simply

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sun, Sep 09, 2018 at 04:48:19PM +0200, Miguel Ojeda wrote: > Indeed. But note that the attribute needs to be written before the > variable name so that it applies to both variables (or write it twice) It warns only about 'steal' - not the other one. > Also, if we go that route, I would simply

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
On Sun, Sep 9, 2018 at 11:36 AM, Borislav Petkov wrote: > > Alternatively, if you don't want to let the crazy ifdeffery in that > function grow even more, you can simply do: > > --- > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 625bc9897f62..1728743360d4 100644 > ---

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Miguel Ojeda
On Sun, Sep 9, 2018 at 11:36 AM, Borislav Petkov wrote: > > Alternatively, if you don't want to let the crazy ifdeffery in that > function grow even more, you can simply do: > > --- > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 625bc9897f62..1728743360d4 100644 > ---

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sat, Sep 08, 2018 at 09:05:53PM +0200, Miguel Ojeda wrote: > On non-SMP configs, when only one of CONFIG_{PARAVIRT,IRQ_TIME}_ACCOUNTING > is defined, we are declaring a variable (irq_delta or steal) which > is not used: > > kernel/sched/core.c: In function ‘update_rq_clock_task’: >

Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-09 Thread Borislav Petkov
On Sat, Sep 08, 2018 at 09:05:53PM +0200, Miguel Ojeda wrote: > On non-SMP configs, when only one of CONFIG_{PARAVIRT,IRQ_TIME}_ACCOUNTING > is defined, we are declaring a variable (irq_delta or steal) which > is not used: > > kernel/sched/core.c: In function ‘update_rq_clock_task’: >

[PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-08 Thread Miguel Ojeda
On non-SMP configs, when only one of CONFIG_{PARAVIRT,IRQ_TIME}_ACCOUNTING is defined, we are declaring a variable (irq_delta or steal) which is not used: kernel/sched/core.c: In function ‘update_rq_clock_task’: kernel/sched/core.c:139:17: warning: unused variable ‘irq_delta’

[PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs

2018-09-08 Thread Miguel Ojeda
On non-SMP configs, when only one of CONFIG_{PARAVIRT,IRQ_TIME}_ACCOUNTING is defined, we are declaring a variable (irq_delta or steal) which is not used: kernel/sched/core.c: In function ‘update_rq_clock_task’: kernel/sched/core.c:139:17: warning: unused variable ‘irq_delta’