Re: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs
From: Miguel Ojeda
Date: Sun Sep 09 2018 - 12:36:24 EST
Hi Borislav,
On Sun, Sep 9, 2018 at 6:06 PM, Borislav Petkov <bp@xxxxxxxxx> 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 about 'steal' - not the other one.
No, you get a different warning depending on whether you have enabled
CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING.
In other words, !SMP && IRQ warns about "steal", while !SMP &&
PARAVIRT warns about "irq_delta" (the example warning I posted is for
this last case).
Cheers,
Miguel