From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757897AbaISTer (ORCPT ); Fri, 19 Sep 2014 15:34:47 -0400 Received: from mail-vc0-f177.google.com ([209.85.220.177]:45708 "EHLO mail-vc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757845AbaISTeo (ORCPT ); Fri, 19 Sep 2014 15:34:44 -0400 MIME-Version: 1.0 In-Reply-To: <1411140580-20909-8-git-send-email-jeffrey.t.kirsher@intel.com> References: <1411140580-20909-1-git-send-email-jeffrey.t.kirsher@intel.com> <1411140580-20909-8-git-send-email-jeffrey.t.kirsher@intel.com> Date: Fri, 19 Sep 2014 21:34:43 +0200 Message-ID: Subject: Re: [PATCH 7/7] sched: Silence nested-externs warnings From: Richard Weinberger To: Jeff Kirsher Cc: sparse@chrisli.org, Mark Rustad , linux-sparse@vger.kernel.org, LKML , Ingo Molnar , Peter Zijlstra , Brian Norris Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 19, 2014 at 5:29 PM, Jeff Kirsher wrote: > From: Mark Rustad > > Use diagnostic control macros to ignore nested-externs warnings > in this case. > > CC: Ingo Molnar > CC: Peter Zijlstra > CC: Brian Norris > Signed-off-by: Mark Rustad > Signed-off-by: Jeff Kirsher > --- > 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. -- Thanks, //richard