printk: Make linux/printk.h self-contained
diff mbox series

Message ID 20200611125144.GA2506@gondor.apana.org.au
State New, archived
Headers show
Series
  • printk: Make linux/printk.h self-contained
Related show

Commit Message

Herbert Xu June 11, 2020, 12:51 p.m. UTC
As it stands if you include printk.h it will fail to compile
because it requires definitions from ratelimit.h.  However, simply
including ratelimit.h from printk.h does not work due to inclusion
loops involving sched.h and kernel.h.

This patch solves this by moving bits from ratelimit.h into a new
header file which can then be included by printk.h without any
worries about header loops.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

kernel test robot June 11, 2020, 3:53 p.m. UTC | #1
Hi Herbert,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on pmladek/for-next linux/master v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Herbert-Xu/printk-Make-linux-printk-h-self-contained/20200611-205340
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/block/drbd/drbd_interval.c:2:
>> arch/s390/include/asm/bug.h:43: warning: "BUG" redefined
43 | #define BUG() do {              |
In file included from include/linux/bug.h:32,
from include/linux/mmdebug.h:5,
from arch/s390/include/asm/cmpxchg.h:11,
from arch/s390/include/asm/atomic.h:16,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from arch/s390/include/asm/bug.h:5,
from drivers/block/drbd/drbd_interval.c:2:
include/asm-generic/bug.h:54: note: this is the location of the previous definition
54 | #define BUG() do {          |
In file included from drivers/block/drbd/drbd_interval.c:2:
>> arch/s390/include/asm/bug.h:52: warning: "WARN_ON" redefined
52 | #define WARN_ON(x) ({              |
In file included from include/linux/bug.h:32,
from include/linux/mmdebug.h:5,
from arch/s390/include/asm/cmpxchg.h:11,
from arch/s390/include/asm/atomic.h:16,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from arch/s390/include/asm/bug.h:5,
from drivers/block/drbd/drbd_interval.c:2:
include/asm-generic/bug.h:112: note: this is the location of the previous definition
112 | #define WARN_ON(condition) ({               |

vim +/BUG +43 arch/s390/include/asm/bug.h

c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  42  
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25 @43  #define BUG() do {					\
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25  44  	__EMIT_BUG(0);					\
5506e68975c346 arch/s390/include/asm/bug.h David Daney        2009-12-04  45  	unreachable();					\
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25  46  } while (0)
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  47  
19d436268dde95 arch/s390/include/asm/bug.h Peter Zijlstra     2017-02-25  48  #define __WARN_FLAGS(flags) do {			\
19d436268dde95 arch/s390/include/asm/bug.h Peter Zijlstra     2017-02-25  49  	__EMIT_BUG(BUGFLAG_WARNING|(flags));		\
a9df8e325d0de5 arch/s390/include/asm/bug.h Heiko Carstens     2010-01-13  50  } while (0)
a9df8e325d0de5 arch/s390/include/asm/bug.h Heiko Carstens     2010-01-13  51  
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27 @52  #define WARN_ON(x) ({					\
fd0cbdd378258f include/asm-s390/bug.h      Heiko Carstens     2007-08-02  53  	int __ret_warn_on = !!(x);			\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  54  	if (__builtin_constant_p(__ret_warn_on)) {	\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  55  		if (__ret_warn_on)			\
b2be05273a1744 arch/s390/include/asm/bug.h Ben Hutchings      2010-04-03  56  			__WARN();			\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  57  	} else {					\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  58  		if (unlikely(__ret_warn_on))		\
b2be05273a1744 arch/s390/include/asm/bug.h Ben Hutchings      2010-04-03  59  			__WARN();			\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  60  	}						\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  61  	unlikely(__ret_warn_on);			\
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  62  })
c0007f1a65762e include/asm-s390/bug.h      Heiko Carstens     2007-04-27  63  

:::::: The code at line 43 was first introduced by commit
:::::: 2d6cd2a5908adecd06c8cee2a73814463ed71493 [S390] remove warnings with functions ending in BUG

:::::: TO: Martin Schwidefsky <schwidefsky@de.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky@de.ibm.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot June 11, 2020, 4:31 p.m. UTC | #2
Hi Herbert,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on pmladek/for-next linux/master v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Herbert-Xu/printk-Make-linux-printk-h-self-contained/20200611-205340
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
config: powerpc64-randconfig-r013-20200611 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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

WARNING: unmet direct dependencies detected for HOTPLUG_CPU
Depends on SMP && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
Selected by
- PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE && PM_SLEEP
In file included from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/powerpc/include/asm/page_32.h: In function 'clear_page':
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:87:4: error: implicit declaration of function '__WARN'
87 | __WARN(); | ^~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:38: error: 'TAINT_WARN' undeclared (first use in this function)
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~
arch/powerpc/include/asm/bug.h:57:10: note: in definition of macro 'BUG_ENTRY'
57 | "i" (flags), | ^~~~~
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:24: note: in expansion of macro 'BUGFLAG_TAINT'
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
arch/powerpc/include/asm/bug.h:90:38: note: each undeclared identifier is reported only once for each function it appears in
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~
arch/powerpc/include/asm/bug.h:57:10: note: in definition of macro 'BUG_ENTRY'
57 | "i" (flags), | ^~~~~
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:24: note: in expansion of macro 'BUGFLAG_TAINT'
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:58:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
58 | "i" (sizeof(struct bug_entry)), | ^~~~~~
<<                  from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:89:3: note: in expansion of macro 'BUG_ENTRY'
89 | BUG_ENTRY(PPC_TLNEI " %4, 0", | ^~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
In file included from arch/powerpc/include/asm/ptrace.h:253,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/powerpc/include/asm/bug.h:109,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/thread_info.h: In function 'copy_overflow':
>> include/linux/thread_info.h:134:2: error: implicit declaration of function 'WARN'
134 | WARN(1, "Buffer overflow detected (%d < %lu)!n", size, count);
| ^~~~
include/linux/thread_info.h: In function 'check_copy_size':
>> include/linux/thread_info.h:150:6: error: implicit declaration of function 'WARN_ON_ONCE'
150 | if (WARN_ON_ONCE(bytes > INT_MAX))
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [scripts/Makefile.build:114: kernel/bounds.s] Error 1
Target '__build' not remade because of errors.
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [Makefile:1188: prepare0] Error 2
Target 'prepare' not remade because of errors.
make: Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [Makefile:185: __sub-make] Error 2

vim +/__WARN +87 arch/powerpc/include/asm/bug.h

73c9ceab40b1269 include/asm-powerpc/bug.h      Jeremy Fitzhardinge 2006-12-08  51  
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  52  #define BUG_ENTRY(insn, flags, ...)			\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  53  	__asm__ __volatile__(				\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  54  		"1:	" insn "\n"			\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  55  		_EMIT_BUG_ENTRY				\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  56  		: : "i" (__FILE__), "i" (__LINE__),	\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  57  		  "i" (flags),				\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19 @58  		  "i" (sizeof(struct bug_entry)),	\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  59  		  ##__VA_ARGS__)
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  60  
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  61  /*
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  62   * BUG_ON() and WARN_ON() do their best to cooperate with compile-time
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  63   * optimisations. However depending on the complexity of the condition
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  64   * some compiler versions may not produce optimal results.
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  65   */
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  66  
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  67  #define BUG() do {						\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  68  	BUG_ENTRY("twi 31, 0, 0", 0);				\
01ae45bcd48527e arch/powerpc/include/asm/bug.h David Daney         2009-12-10  69  	unreachable();						\
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  70  } while (0)
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  71  
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  72  #define BUG_ON(x) do {						\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  73  	if (__builtin_constant_p(x)) {				\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  74  		if (x)						\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  75  			BUG();					\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  76  	} else {						\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  77  		BUG_ENTRY(PPC_TLNEI " %4, 0", 0, "r" ((__force long)(x)));	\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  78  	}							\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  79  } while (0)
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  80  
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19  81  #define __WARN_FLAGS(flags) BUG_ENTRY("twi 31, 0, 0", BUGFLAG_WARNING | (flags))
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  82  
684f978347deb42 include/asm-powerpc/bug.h      Herbert Xu          2006-09-29  83  #define WARN_ON(x) ({						\
8d4fbcfbe0a4bfc include/asm-powerpc/bug.h      Linus Torvalds      2007-07-31  84  	int __ret_warn_on = !!(x);				\
684f978347deb42 include/asm-powerpc/bug.h      Herbert Xu          2006-09-29  85  	if (__builtin_constant_p(__ret_warn_on)) {		\
684f978347deb42 include/asm-powerpc/bug.h      Herbert Xu          2006-09-29  86  		if (__ret_warn_on)				\
872345b715ee02f include/asm-powerpc/bug.h      Andrew Morton       2006-03-27 @87  			__WARN();				\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  88  	} else {						\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19 @89  		BUG_ENTRY(PPC_TLNEI " %4, 0",			\
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy    2019-08-19 @90  			  BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN),	\
73c9ceab40b1269 include/asm-powerpc/bug.h      Jeremy Fitzhardinge 2006-12-08  91  			  "r" (__ret_warn_on));	\
e3f94b85f98a346 include/asm-powerpc/bug.h      Michael Ellerman    2006-03-23  92  	}							\
684f978347deb42 include/asm-powerpc/bug.h      Herbert Xu          2006-09-29  93  	unlikely(__ret_warn_on);				\
684f978347deb42 include/asm-powerpc/bug.h      Herbert Xu          2006-09-29  94  })
^1da177e4c3f415 include/asm-ppc64/bug.h        Linus Torvalds      2005-04-16  95  

:::::: The code at line 87 was first introduced by commit
:::::: 872345b715ee02f3b45528449f0d11b44ef9ebb8 [PATCH] git-powerpc: WARN was a dumb idea

:::::: TO: Andrew Morton <akpm@osdl.org>
:::::: CC: Paul Mackerras <paulus@samba.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot June 13, 2020, 12:28 p.m. UTC | #3
Hi Herbert,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Herbert-Xu/printk-Make-linux-printk-h-self-contained/20200611-205340
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: powerpc-randconfig-s031-20200611 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-250-g42323db3-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/ptrace.c:53:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/ptrace.c:53:22: sparse:    struct task_struct *
   kernel/ptrace.c:53:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/ptrace.c:196:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/ptrace.c:196:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/ptrace.c:196:9: sparse:    struct task_struct *
   kernel/ptrace.c:241:44: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/ptrace.c:241:44: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/ptrace.c:241:44: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/user.c:105:27: sparse: sparse: unknown field name in initializer
   kernel/user.c:105:27: sparse: sparse: unknown field name in initializer
   kernel/user.c:105:27: sparse: sparse: unknown field name in initializer
   include/linux/ratelimit.h:14:9: sparse: sparse: no member 'lock' in struct ratelimit_state
   include/linux/ratelimit.h:15:11: sparse: sparse: no member 'interval' in struct ratelimit_state
   include/linux/ratelimit.h:16:11: sparse: sparse: no member 'burst' in struct ratelimit_state
   include/linux/ratelimit.h:40:11: sparse: sparse: no member 'flags' in struct ratelimit_state
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   arch/powerpc/kernel/signal_64.c:804:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_64.c:804:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_64.c:804:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_64.c:916:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_64.c:916:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_64.c:916:17: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   arch/powerpc/kernel/traps.c:312:16: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:312:16: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:312:16: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:1843:9: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:1843:9: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:1843:9: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:2299:9: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:2299:9: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/traps.c:2299:9: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   arch/powerpc/kernel/signal_32.c:843:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:843:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:843:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1100:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1100:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1100:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1295:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1295:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1295:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1371:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1371:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kernel/signal_32.c:1371:17: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   arch/powerpc/kvm/book3s_emulate.c:847:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kvm/book3s_emulate.c:847:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kvm/book3s_emulate.c:847:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kvm/book3s_emulate.c:1012:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kvm/book3s_emulate.c:1012:17: sparse: sparse: unknown field name in initializer
   arch/powerpc/kvm/book3s_emulate.c:1012:17: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/sched/core.c:4506:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:4506:17: sparse:    struct task_struct *
   kernel/sched/core.c:4506:17: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/core.c:4705:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:4705:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/core.c:4705:22: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1809:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct *
   kernel/sched/core.c:1388:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:1388:38: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/core.c:1388:38: sparse:    struct task_struct const *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1809:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1809:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1809:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
   kernel/sched/sched.h:1809:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1809:9: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/sched/fair.c:5386:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/fair.c:5386:38: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/fair.c:5386:38: sparse:    struct task_struct *
   kernel/sched/fair.c:8582:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/fair.c:8582:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/fair.c:8582:22: sparse:    struct task_struct *
   kernel/sched/fair.c:10692:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/fair.c:10692:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/fair.c:10692:22: sparse:    struct task_struct *
   kernel/sched/fair.c:10825:30: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/fair.c:10825:30: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/fair.c:10825:30: sparse:    struct task_struct *
   kernel/sched/fair.c:5330:35: sparse: sparse: marked inline, but without a definition
   kernel/sched/sched.h:1803:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1803:9: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/sched/rt.c:912:70: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/rt.c:912:70: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/rt.c:912:70: sparse:    struct task_struct *
   kernel/sched/rt.c:2183:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/rt.c:2183:25: sparse:    struct task_struct *
   kernel/sched/rt.c:2183:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/rt.c:1876:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/rt.c:1876:13: sparse:    struct task_struct *
   kernel/sched/rt.c:1876:13: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/rt.c:2300:46: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/rt.c:2300:46: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/rt.c:2300:46: sparse:    struct task_struct *
   kernel/sched/rt.c:2320:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/rt.c:2320:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/rt.c:2320:22: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/sched/deadline.c:2059:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/deadline.c:2059:13: sparse:    struct task_struct *
   kernel/sched/deadline.c:2059:13: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/deadline.c:2186:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/deadline.c:2186:25: sparse:    struct task_struct *
   kernel/sched/deadline.c:2186:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/deadline.c:2385:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/deadline.c:2385:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/deadline.c:2385:22: sparse:    struct task_struct *
   kernel/sched/deadline.c:2404:46: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/deadline.c:2404:46: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/deadline.c:2404:46: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
   kernel/sched/sched.h:1657:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/sched.h:1657:25: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   kernel/sched/debug.c:435:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/debug.c:435:22: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/sched/debug.c:435:22: sparse:    struct task_struct *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   net/ipv4/nexthop.c:1088:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/ipv4/nexthop.c:1088:24: sparse:    struct rb_node [noderef] <asn:4> *
   net/ipv4/nexthop.c:1088:24: sparse:    struct rb_node *
   include/linux/rbtree.h:84:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   include/linux/rbtree.h:84:9: sparse:    struct rb_node [noderef] <asn:4> *
   include/linux/rbtree.h:84:9: sparse:    struct rb_node *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   drivers/char/random.c:475:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:475:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:475:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:477:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:477:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:477:9: sparse: sparse: unknown field name in initializer
   drivers/char/random.c:985:37: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:986:25: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:988:41: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:990:36: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:991:25: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:993:40: sparse: sparse: no member 'missed' in struct ratelimit_state
   drivers/char/random.c:1805:32: sparse: sparse: no member 'interval' in struct ratelimit_state
   drivers/char/random.c:1806:33: sparse: sparse: no member 'interval' in struct ratelimit_state
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/super.c:2326:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/super.c:2326:31: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/super.c:2326:31: sparse:    struct rcu_string *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/ctree.c:129:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/ctree.c:129:22: sparse:    struct extent_buffer [noderef] <asn:4> *
   fs/btrfs/ctree.c:129:22: sparse:    struct extent_buffer *
   fs/btrfs/ctree.c:1085:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/ctree.c:1085:17: sparse:    struct extent_buffer [noderef] <asn:4> *
   fs/btrfs/ctree.c:1085:17: sparse:    struct extent_buffer *
   fs/btrfs/ctree.c:1846:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/ctree.c:1846:17: sparse:    struct extent_buffer [noderef] <asn:4> *
   fs/btrfs/ctree.c:1846:17: sparse:    struct extent_buffer *
   fs/btrfs/ctree.c:3332:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/ctree.c:3332:9: sparse:    struct extent_buffer [noderef] <asn:4> *
   fs/btrfs/ctree.c:3332:9: sparse:    struct extent_buffer *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/extent-tree.c:4517:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:4517:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:4517:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5040:33: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5040:33: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5040:33: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5151:41: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5151:41: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5151:41: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5187:9: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5187:9: sparse: sparse: unknown field name in initializer
   fs/btrfs/extent-tree.c:5187:9: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/volumes.c:7336:9: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:7336:9: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:7336:9: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:7336:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:7336:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:7336:9: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:7356:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:7356:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:7356:9: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:539:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:539:24: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:539:24: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:858:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:858:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:858:17: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:932:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:932:33: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:932:33: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:939:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:939:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:939:25: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:951:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:951:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:951:17: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:1012:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:1012:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:1012:25: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:2055:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:2055:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:2055:17: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:2539:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:2539:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:2539:9: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:4104:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:4104:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:4104:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6325:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:6325:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:6325:9: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:6535:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6535:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6535:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6538:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6538:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:6538:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/volumes.c:7242:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:7242:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:7242:17: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:7253:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:7253:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:7253:25: sparse:    struct rcu_string *
   fs/btrfs/volumes.c:7267:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/volumes.c:7267:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/volumes.c:7267:25: sparse:    struct rcu_string *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/scrub.c:838:16: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:838:16: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:838:16: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1180:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1180:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1180:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1180:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:1180:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:1180:25: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:1189:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1189:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1189:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1189:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:1189:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:1189:17: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:1563:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1563:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:1563:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:703:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:703:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:703:17: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:717:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:717:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:717:9: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:775:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:775:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:775:25: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:2136:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2136:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2136:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2136:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:2136:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:2136:17: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:2143:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2143:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2143:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:2143:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:2143:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:2143:17: sparse:    struct rcu_string *
   fs/btrfs/scrub.c:3862:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:3862:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:3862:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/scrub.c:3901:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/scrub.c:3901:17: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/scrub.c:3901:17: sparse:    struct rcu_string *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/qgroup.c:1927:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:1927:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:1927:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:1945:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:1945:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:1945:25: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:2039:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:2039:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:2039:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:3844:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:3844:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:3844:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:4008:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:4008:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/qgroup.c:4008:17: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/dev-replace.c:683:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/dev-replace.c:683:25: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/dev-replace.c:683:25: sparse:    struct rcu_string *
   fs/btrfs/dev-replace.c:700:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/dev-replace.c:700:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/dev-replace.c:700:9: sparse:    struct rcu_string *
   fs/btrfs/dev-replace.c:279:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/dev-replace.c:279:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/dev-replace.c:279:9: sparse:    struct rcu_string *
   fs/btrfs/dev-replace.c:431:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/dev-replace.c:431:24: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/dev-replace.c:431:24: sparse:    struct rcu_string *
   fs/btrfs/dev-replace.c:493:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/btrfs/dev-replace.c:493:9: sparse:    struct rcu_string [noderef] <asn:4> *
   fs/btrfs/dev-replace.c:493:9: sparse:    struct rcu_string *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/block-rsv.c:509:24: sparse: sparse: unknown field name in initializer
   fs/btrfs/block-rsv.c:509:24: sparse: sparse: unknown field name in initializer
   fs/btrfs/block-rsv.c:509:24: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   fs/btrfs/reflink.c:581:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/reflink.c:581:17: sparse: sparse: unknown field name in initializer
   fs/btrfs/reflink.c:581:17: sparse: sparse: unknown field name in initializer
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   include/linux/rculist_bl.h:24:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
   include/linux/rculist_bl.h:24:33: sparse:    struct hlist_bl_node [noderef] <asn:4> *
   include/linux/rculist_bl.h:24:33: sparse:    struct hlist_bl_node *
   include/linux/rculist_bl.h:17:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   include/linux/rculist_bl.h:17:9: sparse:    struct hlist_bl_node [noderef] <asn:4> *
   include/linux/rculist_bl.h:17:9: sparse:    struct hlist_bl_node *
   include/linux/rculist_bl.h:17:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   include/linux/rculist_bl.h:17:9: sparse:    struct hlist_bl_node [noderef] <asn:4> *
   include/linux/rculist_bl.h:17:9: sparse:    struct hlist_bl_node *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   drivers/md/md-linear.c:61:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-linear.c:61:16: sparse:    void [noderef] <asn:4> *
   drivers/md/md-linear.c:61:16: sparse:    void *
   drivers/md/md-linear.c:219:19: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-linear.c:219:19: sparse:    void [noderef] <asn:4> *
   drivers/md/md-linear.c:219:19: sparse:    void *
   drivers/md/md-linear.c:224:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-linear.c:224:9: sparse:    void [noderef] <asn:4> *
   drivers/md/md-linear.c:224:9: sparse:    void *
--
>> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
   include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
   include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
   include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
   include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
   drivers/md/md-multipath.c:37:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-multipath.c:37:40: sparse:    struct md_rdev [noderef] <asn:4> *
   drivers/md/md-multipath.c:37:40: sparse:    struct md_rdev *
   drivers/md/md-multipath.c:47:9: sparse: sparse: unknown field name in initializer
   drivers/md/md-multipath.c:47:9: sparse: sparse: unknown field name in initializer
   drivers/md/md-multipath.c:47:9: sparse: sparse: unknown field name in initializer
   drivers/md/md-multipath.c:147:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-multipath.c:147:40: sparse:    struct md_rdev [noderef] <asn:4> *
   drivers/md/md-multipath.c:147:40: sparse:    struct md_rdev *
   drivers/md/md-multipath.c:161:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-multipath.c:161:40: sparse:    struct md_rdev [noderef] <asn:4> *
   drivers/md/md-multipath.c:161:40: sparse:    struct md_rdev *
   drivers/md/md-multipath.c:261:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/md-multipath.c:261:25: sparse:    struct md_rdev [noderef] <asn:4> *
   drivers/md/md-multipath.c:261:25: sparse:    struct md_rdev *

# https://github.com/0day-ci/linux/commit/17b41842ecf70ea595220b384e6380d29c39b555
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 17b41842ecf70ea595220b384e6380d29c39b555
vim +16 include/linux/ratelimit_types.h

17b41842ecf70e Herbert Xu 2020-06-11  14  
17b41842ecf70e Herbert Xu 2020-06-11  15  struct ratelimit_state {
17b41842ecf70e Herbert Xu 2020-06-11 @16  	raw_spinlock_t	lock;		/* protect the state */
17b41842ecf70e Herbert Xu 2020-06-11  17  
17b41842ecf70e Herbert Xu 2020-06-11  18  	int		interval;
17b41842ecf70e Herbert Xu 2020-06-11  19  	int		burst;
17b41842ecf70e Herbert Xu 2020-06-11  20  	int		printed;
17b41842ecf70e Herbert Xu 2020-06-11  21  	int		missed;
17b41842ecf70e Herbert Xu 2020-06-11  22  	unsigned long	begin;
17b41842ecf70e Herbert Xu 2020-06-11  23  	unsigned long	flags;
17b41842ecf70e Herbert Xu 2020-06-11  24  };
17b41842ecf70e Herbert Xu 2020-06-11  25  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Herbert Xu June 13, 2020, 1:09 p.m. UTC | #4
On Sat, Jun 13, 2020 at 08:28:34PM +0800, kernel test robot wrote:
> 
> Hi Herbert,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on linus/master]
> [also build test WARNING on v5.7 next-20200611]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> 
> url:    https://github.com/0day-ci/linux/commits/Herbert-Xu/printk-Make-linux-printk-h-self-contained/20200611-205340
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
> :::::: branch date: 13 hours ago
> :::::: commit date: 13 hours ago
> config: powerpc-randconfig-s031-20200611 (attached as .config)
> compiler: powerpc64le-linux-gcc (GCC) 9.3.0
> reproduce:
>         # apt-get install sparse
>         # sparse version: v0.6.1-250-g42323db3-dirty
>         # save the attached .config to linux build tree
>         make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
>    include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
>    include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
>    include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
>    include/linux/ratelimit_types.h:24:1: sparse: sparse: got }

This looks like a bug in sparse as the same code compiles just
fine.

Cheers,
Luc Van Oostenryck June 13, 2020, 2:29 p.m. UTC | #5
On Sat, Jun 13, 2020 at 11:09:49PM +1000, Herbert Xu wrote:
> On Sat, Jun 13, 2020 at 08:28:34PM +0800, kernel test robot wrote:
> > 
> > Hi Herbert,
> > 
> > I love your patch! Perhaps something to improve:
> > 
> > [auto build test WARNING on linus/master]
> > [also build test WARNING on v5.7 next-20200611]
> > [if your patch is applied to the wrong git tree, please drop us a note to help
> > improve the system. BTW, we also suggest to use '--base' option to specify the
> > base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> > 
> > url:    https://github.com/0day-ci/linux/commits/Herbert-Xu/printk-Make-linux-printk-h-self-contained/20200611-205340
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
> > :::::: branch date: 13 hours ago
> > :::::: commit date: 13 hours ago
> > config: powerpc-randconfig-s031-20200611 (attached as .config)
> > compiler: powerpc64le-linux-gcc (GCC) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.1-250-g42323db3-dirty
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > 
> > sparse warnings: (new ones prefixed by >>)
> > 
> > >> include/linux/ratelimit_types.h:16:25: sparse: sparse: expected ; at end of declaration
> >    include/linux/ratelimit_types.h:16:25: sparse: sparse: Expected } at end of struct-union-enum-specifier
> >    include/linux/ratelimit_types.h:16:25: sparse: sparse: got lock
> >    include/linux/ratelimit_types.h:24:1: sparse: sparse: Expected ; at the end of type declaration
> >    include/linux/ratelimit_types.h:24:1: sparse: sparse: got }
> 
> This looks like a bug in sparse as the same code compiles just
> fine.

Hi,

When trying to reproduce, before using sparse, I get:
      CC      kernel/ptrace.o
    In file included from ./include/linux/printk.h:10:0,
                     from ./include/linux/kernel.h:15,
                     from ./include/linux/list.h:9,
                     from ./include/linux/lockdep.h:43,
                     from ./include/linux/spinlock_types.h:18,
                     from ./arch/powerpc/include/asm/lppaca.h:45,
                     from ./arch/powerpc/include/asm/paca.h:17,
                     from ./arch/powerpc/include/asm/current.h:13,
                     from ./include/linux/sched.h:12,
                     from kernel/ptrace.c:13:
    ./include/linux/ratelimit_types.h:16:2: error: unknown type name ‘raw_spinlock_t’
      raw_spinlock_t lock;  /* protect the state */
      ^
    In file included from ./include/linux/wait.h:9:0,
                     from ./include/linux/pid.h:6,
                     from ./include/linux/sched.h:14,
                     from kernel/ptrace.c:13:
    ./include/linux/ratelimit.h: In function ‘ratelimit_state_init’:
    ./include/linux/spinlock.h:100:16: warning: passing argument 1 of ‘__raw_spin_lock_init’ from incompatible pointer type [enabled by default]
      static struct lock_class_key __key;    \
                    ^
    ./include/linux/ratelimit.h:14:2: note: in expansion of macro ‘raw_spin_lock_init’
      raw_spin_lock_init(&rs->lock);
      ^
    ./include/linux/spinlock.h:95:15: note: expected ‘struct raw_spinlock_t *’ but argument is of type ‘int *’
       extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
                   ^
    make[1]: *** [scripts/Makefile.build:281: kernel/ptrace.o] Error 1
    make: *** [Makefile:1777: kernel] Error 2


while there is no such problem with the previous commit.
I think the problem is that:
* ratelimit.h needs raw_spinlock_t
* spinlock_types.h needs lockdep.h
* lockdep.h needs ratelimit.h


Best regards,
Luc
Herbert Xu June 15, 2020, 11:40 a.m. UTC | #6
On Sat, Jun 13, 2020 at 04:29:01PM +0200, Luc Van Oostenryck wrote:
>
> while there is no such problem with the previous commit.
> I think the problem is that:
> * ratelimit.h needs raw_spinlock_t
> * spinlock_types.h needs lockdep.h
> * lockdep.h needs ratelimit.h

Thanks for investigating.  I now realise that this was sent against
my first patch which did have this problem, which was fixed in my
second patch.  Sorry for the false alarm.

Cheers,
Steven Rostedt June 15, 2020, 7:17 p.m. UTC | #7
On Mon, 15 Jun 2020 21:40:38 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> Thanks for investigating.  I now realise that this was sent against
> my first patch which did have this problem, which was fixed in my
> second patch.  Sorry for the false alarm.

Which is why it is recommended that new patches start their own threads ;-)

That said,

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

for the v2 patch.

-- Steve

Patch
diff mbox series

diff --git a/include/linux/ratelimit_types.h b/include/linux/ratelimit_types.h
new file mode 100644
index 000000000000..b676aa419eef
--- /dev/null
+++ b/include/linux/ratelimit_types.h
@@ -0,0 +1,43 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_RATELIMIT_TYPES_H
+#define _LINUX_RATELIMIT_TYPES_H
+
+#include <linux/bits.h>
+#include <linux/param.h>
+#include <linux/spinlock_types.h>
+
+#define DEFAULT_RATELIMIT_INTERVAL	(5 * HZ)
+#define DEFAULT_RATELIMIT_BURST		10
+
+/* issue num suppressed message on exit */
+#define RATELIMIT_MSG_ON_RELEASE	BIT(0)
+
+struct ratelimit_state {
+	raw_spinlock_t	lock;		/* protect the state */
+
+	int		interval;
+	int		burst;
+	int		printed;
+	int		missed;
+	unsigned long	begin;
+	unsigned long	flags;
+};
+
+#define RATELIMIT_STATE_INIT(name, interval_init, burst_init) {		\
+		.lock		= __RAW_SPIN_LOCK_UNLOCKED(name.lock),	\
+		.interval	= interval_init,			\
+		.burst		= burst_init,				\
+	}
+
+#define RATELIMIT_STATE_INIT_DISABLED					\
+	RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
+
+#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init)		\
+									\
+	struct ratelimit_state name =					\
+		RATELIMIT_STATE_INIT(name, interval_init, burst_init)	\
+
+extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
+#define __ratelimit(state) ___ratelimit(state, __func__)
+
+#endif /* _LINUX_RATELIMIT_TYPES_H */
diff --git a/include/linux/printk.h b/include/linux/printk.h
index e061635e0409..1cd862cfd2f4 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -7,6 +7,7 @@ 
 #include <linux/kern_levels.h>
 #include <linux/linkage.h>
 #include <linux/cache.h>
+#include <linux/ratelimit_types.h>
 
 extern const char linux_banner[];
 extern const char linux_proc_banner[];
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
index 8ddf79e9207a..b17e0cd0a30c 100644
--- a/include/linux/ratelimit.h
+++ b/include/linux/ratelimit.h
@@ -2,41 +2,10 @@ 
 #ifndef _LINUX_RATELIMIT_H
 #define _LINUX_RATELIMIT_H
 
-#include <linux/param.h>
+#include <linux/ratelimit_types.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 
-#define DEFAULT_RATELIMIT_INTERVAL	(5 * HZ)
-#define DEFAULT_RATELIMIT_BURST		10
-
-/* issue num suppressed message on exit */
-#define RATELIMIT_MSG_ON_RELEASE	BIT(0)
-
-struct ratelimit_state {
-	raw_spinlock_t	lock;		/* protect the state */
-
-	int		interval;
-	int		burst;
-	int		printed;
-	int		missed;
-	unsigned long	begin;
-	unsigned long	flags;
-};
-
-#define RATELIMIT_STATE_INIT(name, interval_init, burst_init) {		\
-		.lock		= __RAW_SPIN_LOCK_UNLOCKED(name.lock),	\
-		.interval	= interval_init,			\
-		.burst		= burst_init,				\
-	}
-
-#define RATELIMIT_STATE_INIT_DISABLED					\
-	RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
-
-#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init)		\
-									\
-	struct ratelimit_state name =					\
-		RATELIMIT_STATE_INIT(name, interval_init, burst_init)	\
-
 static inline void ratelimit_state_init(struct ratelimit_state *rs,
 					int interval, int burst)
 {
@@ -73,9 +42,6 @@  ratelimit_set_flags(struct ratelimit_state *rs, unsigned long flags)
 
 extern struct ratelimit_state printk_ratelimit_state;
 
-extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
-#define __ratelimit(state) ___ratelimit(state, __func__)
-
 #ifdef CONFIG_PRINTK
 
 #define WARN_ON_RATELIMIT(condition, state)	({		\