Re: [PATCH 7/7] sched: Silence nested-externs warnings
From: Rustad, Mark D
Date: Fri Sep 19 2014 - 16:35:23 EST
On Sep 19, 2014, at 12:34 PM, Richard Weinberger <richard.weinberger@xxxxxxxxx> wrote:
> On Fri, Sep 19, 2014 at 5:29 PM, Jeff Kirsher
> <jeffrey.t.kirsher@xxxxxxxxx> wrote:
>> From: Mark Rustad <mark.d.rustad@xxxxxxxxx>
>>
>> Use diagnostic control macros to ignore nested-externs warnings
>> in this case.
>>
>> CC: Ingo Molnar <mingo@xxxxxxxxxx>
>> CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>> CC: Brian Norris <computersforpeace@xxxxxxxxx>
>> Signed-off-by: Mark Rustad <mark.d.rustad@xxxxxxxxx>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
>> ---
>> 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
>
> This ridiculous, please try to move this extern into the appropriate header file
> instead of surrounding it with these macros.
Excellent. I'll try adding an include of delayacct.h instead. My patch was based on the assumption that the existing code was wanted in that form for some reason, so the patch served a purpose in recognizing that it isn't. So the macros have served a purpose before even being in place. :-)
--
Mark Rustad, Networking Division, Intel Corporation
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail