mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Nazarewicz <mina86@mina86.com>,
	Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	Borislav Petkov <bp@suse.de>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Johannes Berg <johannes.berg@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexander Potapenko <glider@google.com>,
	Ian Abbott <abbotti@mev.co.uk>
Subject: Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
Date: Thu, 25 May 2017 07:53:01 +0800	[thread overview]
Message-ID: <201705250729.WFENkBtb%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170524160627.14322-1-abbotti@mev.co.uk>

[-- Attachment #1: Type: text/plain, Size: 11413 bytes --]

Hi Ian,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-063508
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/bug.h:81:0,
                    from include/linux/bug.h:4,
                    from include/linux/jump_label.h:184,
                    from arch/x86/include/asm/string_64.h:5,
                    from arch/x86/include/asm/string.h:4,
                    from include/linux/string.h:18,
                    from include/uapi/linux/uuid.h:21,
                    from include/linux/uuid.h:19,
                    from include/linux/mod_devicetable.h:12,
                    from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
         struct pt_regs *regs, struct warn_args *args);
                ^~~~~~~
   include/linux/jump_label.h: In function 'static_key_slow_inc':
>> include/asm-generic/bug.h:92:36: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
    #define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
                                       ^
   include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
      __WARN_printf(format);     \
      ^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
    #define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized,        \
                                   ^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
     STATIC_KEY_CHECK_USE();
     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bug.h:4:0,
                    from include/linux/jump_label.h:184,
                    from arch/x86/include/asm/string_64.h:5,
                    from arch/x86/include/asm/string.h:4,
                    from include/linux/string.h:18,
                    from include/uapi/linux/uuid.h:21,
                    from include/linux/uuid.h:19,
                    from include/linux/mod_devicetable.h:12,
                    from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
    #define __WARN()  __WARN_TAINT(TAINT_WARN)
                                   ^
   arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
        "i" (flags),     \
             ^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                 ^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                              ^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
    #define __WARN()  __WARN_TAINT(TAINT_WARN)
                      ^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
    #define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
                                                    ^~~~~~
   include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
      __WARN_printf(format);     \
      ^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
    #define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized,        \
                                   ^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
     STATIC_KEY_CHECK_USE();
     ^~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:91:32: note: each undeclared identifier is reported only once for each function it appears in
    #define __WARN()  __WARN_TAINT(TAINT_WARN)
                                   ^
   arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
        "i" (flags),     \
             ^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                 ^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                              ^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
    #define __WARN()  __WARN_TAINT(TAINT_WARN)
                      ^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
    #define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
                                                    ^~~~~~
   include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
      __WARN_printf(format);     \
      ^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
    #define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized,        \
                                   ^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
     STATIC_KEY_CHECK_USE();
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/jump_label.h: In function 'static_key_slow_dec':
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
    #define __WARN()  __WARN_TAINT(TAINT_WARN)
                                   ^
   arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
        "i" (flags),     \
             ^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                 ^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
    #define __WARN_TAINT(taint)  __WARN_FLAGS(BUGFLAG_TAINT(taint))
                                              ^~~~~~~~~~~~~
--
   In file included from arch/x86/include/asm/bug.h:81:0,
                    from include/linux/bug.h:4,
                    from include/linux/page-flags.h:9,
                    from kernel/bounds.c:9:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
         struct pt_regs *regs, struct warn_args *args);
                ^~~~~~~

vim +/printk +92 include/asm-generic/bug.h

^1da177e4 Linus Torvalds   2005-04-16   54  
^1da177e4 Linus Torvalds   2005-04-16   55  #ifndef HAVE_ARCH_BUG_ON
2a41de48b Alexey Dobriyan  2007-07-17   56  #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^1da177e4 Linus Torvalds   2005-04-16   57  #endif
^1da177e4 Linus Torvalds   2005-04-16   58  
19d436268 Peter Zijlstra   2017-02-25   59  #ifdef __WARN_FLAGS
19d436268 Peter Zijlstra   2017-02-25  @60  #define __WARN_TAINT(taint)		__WARN_FLAGS(BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra   2017-02-25  @61  #define __WARN_ONCE_TAINT(taint)	__WARN_FLAGS(BUGFLAG_ONCE|BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra   2017-02-25   62  
19d436268 Peter Zijlstra   2017-02-25   63  #define WARN_ON_ONCE(condition) ({				\
19d436268 Peter Zijlstra   2017-02-25   64  	int __ret_warn_on = !!(condition);			\
19d436268 Peter Zijlstra   2017-02-25   65  	if (unlikely(__ret_warn_on))				\
19d436268 Peter Zijlstra   2017-02-25  @66  		__WARN_ONCE_TAINT(TAINT_WARN);			\
19d436268 Peter Zijlstra   2017-02-25   67  	unlikely(__ret_warn_on);				\
19d436268 Peter Zijlstra   2017-02-25   68  })
19d436268 Peter Zijlstra   2017-02-25   69  #endif
19d436268 Peter Zijlstra   2017-02-25   70  
af9379c71 David Brownell   2009-01-06   71  /*
af9379c71 David Brownell   2009-01-06   72   * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
af9379c71 David Brownell   2009-01-06   73   * significant issues that need prompt attention if they should ever
af9379c71 David Brownell   2009-01-06   74   * appear at runtime.  Use the versions with printk format strings
af9379c71 David Brownell   2009-01-06   75   * to provide better diagnostics.
af9379c71 David Brownell   2009-01-06   76   */
b2be05273 Ben Hutchings    2010-04-03   77  #ifndef __WARN_TAINT
b9075fa96 Joe Perches      2011-10-31   78  extern __printf(3, 4)
b9075fa96 Joe Perches      2011-10-31   79  void warn_slowpath_fmt(const char *file, const int line,
b9075fa96 Joe Perches      2011-10-31   80  		       const char *fmt, ...);
b9075fa96 Joe Perches      2011-10-31   81  extern __printf(4, 5)
b9075fa96 Joe Perches      2011-10-31   82  void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
b9075fa96 Joe Perches      2011-10-31   83  			     const char *fmt, ...);
57adc4d2d Andi Kleen       2009-05-06   84  extern void warn_slowpath_null(const char *file, const int line);
79b4cc5ee Arjan van de Ven 2008-01-30   85  #define WANT_WARN_ON_SLOWPATH
57adc4d2d Andi Kleen       2009-05-06   86  #define __WARN()		warn_slowpath_null(__FILE__, __LINE__)
57adc4d2d Andi Kleen       2009-05-06   87  #define __WARN_printf(arg...)	warn_slowpath_fmt(__FILE__, __LINE__, arg)
b2be05273 Ben Hutchings    2010-04-03   88  #define __WARN_printf_taint(taint, arg...)				\
b2be05273 Ben Hutchings    2010-04-03   89  	warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg)
a8f18b909 Arjan van de Ven 2008-07-25   90  #else
b2be05273 Ben Hutchings    2010-04-03  @91  #define __WARN()		__WARN_TAINT(TAINT_WARN)
f6f286f33 Arjan van de Ven 2008-10-20  @92  #define __WARN_printf(arg...)	do { printk(arg); __WARN(); } while (0)
b2be05273 Ben Hutchings    2010-04-03   93  #define __WARN_printf_taint(taint, arg...)				\
b2be05273 Ben Hutchings    2010-04-03   94  	do { printk(arg); __WARN_TAINT(taint); } while (0)
3a6a62f96 Olof Johansson   2008-01-30   95  #endif
3a6a62f96 Olof Johansson   2008-01-30   96  
2553b67a1 Josh Poimboeuf   2016-03-17   97  /* used internally by panic.c */
2553b67a1 Josh Poimboeuf   2016-03-17   98  struct warn_args;
2553b67a1 Josh Poimboeuf   2016-03-17   99  
2553b67a1 Josh Poimboeuf   2016-03-17  100  void __warn(const char *file, int line, void *caller, unsigned taint,
2553b67a1 Josh Poimboeuf   2016-03-17 @101  	    struct pt_regs *regs, struct warn_args *args);
2553b67a1 Josh Poimboeuf   2016-03-17  102  
3a6a62f96 Olof Johansson   2008-01-30  103  #ifndef WARN_ON
3a6a62f96 Olof Johansson   2008-01-30  104  #define WARN_ON(condition) ({						\

:::::: The code at line 92 was first introduced by commit
:::::: f6f286f33e843862c559bfea9281318c4cdec6b0 fix WARN() for PPC

:::::: TO: Arjan van de Ven <arjan@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29880 bytes --]

  parent reply	other threads:[~2017-05-24 23:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 13:21 [PATCH 0/1] bug: fix problem including <linux.bug.h> " Ian Abbott
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
2017-05-24 13:37   ` Rasmus Villemoes
2017-05-24 15:55     ` Ian Abbott
2017-05-24 16:06   ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
2017-05-24 23:11     ` Ian Abbott
2017-05-24 23:26     ` kbuild test robot
2017-05-24 23:53     ` kbuild test robot [this message]
2017-05-25  2:25   ` [PATCH 1/1] bug: fix problem including <linux.bug.h> " kbuild test robot
2017-05-25  2:47   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201705250729.WFENkBtb%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=abbotti@mev.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@suse.de \
    --cc=glider@google.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=johannes.berg@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mina86@mina86.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®