[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4950B4DF-F8A7-4978-B901-CB35EA1B1F5B@intel.com>
Date: Fri, 19 Sep 2014 23:26:28 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"sparse@...isli.org" <sparse@...isli.org>,
"linux-sparse@...r.kernel.org" <linux-sparse@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
Brian Norris <computersforpeace@...il.com>
Subject: Re: [PATCH 7/7] sched: Silence nested-externs warnings
On Sep 19, 2014, at 3:54 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, Sep 19, 2014 at 08:29:40AM -0700, Jeff Kirsher wrote:
>> From: Mark Rustad <mark.d.rustad@...el.com>
>>
>> Use diagnostic control macros to ignore nested-externs warnings
>> in this case.
>>
>> CC: Ingo Molnar <mingo@...hat.com>
>> CC: Peter Zijlstra <peterz@...radead.org>
>> CC: Brian Norris <computersforpeace@...il.com>
>> Signed-off-by: Mark Rustad <mark.d.rustad@...el.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
>> ---
>> include/linux/sched.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/include/linux/sched.h b/include/linux/sched.h
>> index 5c2c885..ed52c76 100644
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -832,7 +832,9 @@ static inline int sched_info_on(void)
>> #ifdef CONFIG_SCHEDSTATS
>> return 1;
>> #elif defined(CONFIG_TASK_DELAY_ACCT)
>> + DIAG_PUSH DIAG_IGNORE(nested-externs)
>> extern int delayacct_on;
>> + DIAG_POP
>> return delayacct_on;
>
> Who has this nested extern warn on in anycase?
They appear in W=2 builds, so you do have to ask for them.
> I've never seen it
> generate a warning. Also WTF is DIAG_PUSH/POP, its not a GCC thing
> afaict.
The first patch in the series adds macros to use the gcc/clang pragmas to control these things. Both compilers have the capability. The macros generate nothing for compilers that lack it.
In any case, this particular one will be resolved instead of silenced.
--
Mark Rustad, Networking Division, Intel Corporation
Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)
Powered by blists - more mailing lists