Re: [PATCH 06/45] C++: Do some basic C++ type definition

From: kbuild test robot
Date: Mon Apr 02 2018 - 00:38:18 EST


Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.16-rc7]
[cannot apply to linus/master tip/x86/core tip/locking/core v4.16 next-20180329]
[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/David-Howells/C-Convert-the-kernel-to-C/20180402-120344
config: x86_64-randconfig-x002-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

include/linux/types.h:188:1: warning: empty declaration
struct list_head {
^~~~~~
include/linux/types.h:192:1: warning: empty declaration
struct hlist_head {
^~~~~~
include/linux/types.h:196:1: warning: empty declaration
struct hlist_node {
^~~~~~
include/linux/types.h:201:2: error: expected specifier-qualifier-list before '__kernel_daddr_t'
__kernel_daddr_t f_tfree;
^~~~~~~~~~~~~~~~
include/linux/types.h:200:1: warning: empty declaration
struct ustat {
^~~~~~
include/linux/types.h:226:1: warning: empty declaration
struct callback_head {
^~~~~~
include/linux/types.h:232:16: error: storage class specified for parameter 'rcu_callback_t'
typedef void (*rcu_callback_t)(struct rcu_head *head);
^~~~~~~~~~~~~~
include/linux/types.h:233:56: error: expected declaration specifiers or '...' before 'rcu_callback_t'
typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func);
^~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5:0,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/compiler.h:187:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
include/linux/compiler.h:205:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
include/linux/compiler.h:210:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from arch/x86/include/asm/barrier.h:5:0,
from include/linux/compiler.h:245,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/x86/include/asm/alternative.h:48:1: warning: empty declaration
struct alt_instr {
^~~~~~
arch/x86/include/asm/alternative.h:61:12: error: storage class specified for parameter 'alternatives_patched'
extern int alternatives_patched;
^~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/alternative.h:63:13: error: storage class specified for parameter 'alternative_instructions'
extern void alternative_instructions(void);
^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/alternative.h:64:13: error: storage class specified for parameter 'apply_alternatives'
extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
^~~~~~~~~~~~~~~~~~
arch/x86/include/asm/alternative.h:66:1: warning: empty declaration
struct module;
^~~~~~
arch/x86/include/asm/alternative.h:79:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
void *text, void *text_end) {}
^
arch/x86/include/asm/alternative.h:80:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
static inline void alternatives_smp_module_del(struct module *mod) {}
^
arch/x86/include/asm/alternative.h:81:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
static inline void alternatives_enable_smp(void) {}
^
arch/x86/include/asm/alternative.h:83:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from arch/x86/include/asm/barrier.h:6:0,
from include/linux/compiler.h:245,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/x86/include/asm/nops.h:143:37: error: storage class specified for parameter 'ideal_nops'
extern const unsigned char * const *ideal_nops;
^~~~~~~~~~
arch/x86/include/asm/nops.h:144:13: error: storage class specified for parameter 'arch_init_ideal_nops'
extern void arch_init_ideal_nops(void);
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler.h:245:0,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/x86/include/asm/barrier.h:38:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from include/linux/compiler.h:246:0,
from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/kasan-checks.h:10:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ }
^
include/linux/kasan-checks.h:12:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ }
^
In file included from include/asm-generic/bug.h:5:0,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/compiler.h:268:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from include/linux/kernel.h:6:0,
from include/asm-generic/bug.h:18,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h:40:27: error: storage class specified for parameter '__gnuc_va_list'
typedef __builtin_va_list __gnuc_va_list;
^~~~~~~~~~~~~~
In file included from include/linux/kernel.h:6:0,
from include/asm-generic/bug.h:18,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h:99:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'va_list'
typedef __gnuc_va_list va_list;
^~~~~~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:7,
from include/asm-generic/bug.h:18,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/export.h:27:1: warning: empty declaration
struct kernel_symbol
^~~~~~
In file included from include/linux/kernel.h:11:0,
from include/asm-generic/bug.h:18,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/bitops.h:29:21: error: storage class specified for parameter '__sw_hweight8'
extern unsigned int __sw_hweight8(unsigned int w);
^~~~~~~~~~~~~
include/linux/bitops.h:30:21: error: storage class specified for parameter '__sw_hweight16'
extern unsigned int __sw_hweight16(unsigned int w);
^~~~~~~~~~~~~~
include/linux/bitops.h:31:21: error: storage class specified for parameter '__sw_hweight32'
extern unsigned int __sw_hweight32(unsigned int w);
^~~~~~~~~~~~~~
include/linux/bitops.h:32:22: error: storage class specified for parameter '__sw_hweight64'
extern unsigned long __sw_hweight64(__u64 w);
^~~~~~~~~~~~~~
In file included from include/linux/bitops.h:38:0,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:18,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/x86/include/asm/bitops.h:74:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:96:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:112:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:133:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:139:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:143:24: error: unknown type name 'bool'
static __always_inline bool clear_bit_unlock_is_negative_byte(long nr, volatile unsigned long *addr)
^~~~
arch/x86/include/asm/bitops.h:144:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:169:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:184:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:198:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
arch/x86/include/asm/bitops.h:218:24: error: unknown type name 'bool'
static __always_inline bool test_and_set_bit(long nr, volatile unsigned long *addr)
^~~~
arch/x86/include/asm/bitops.h:219:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

vim +10 include/linux/kasan-checks.h

64f8ebaf Andrey Ryabinin 2016-05-20 4
64f8ebaf Andrey Ryabinin 2016-05-20 5 #ifdef CONFIG_KASAN
f06e8c58 Dmitry Vyukov 2017-06-22 6 void kasan_check_read(const volatile void *p, unsigned int size);
f06e8c58 Dmitry Vyukov 2017-06-22 7 void kasan_check_write(const volatile void *p, unsigned int size);
64f8ebaf Andrey Ryabinin 2016-05-20 8 #else
f06e8c58 Dmitry Vyukov 2017-06-22 9 static inline void kasan_check_read(const volatile void *p, unsigned int size)
f06e8c58 Dmitry Vyukov 2017-06-22 @10 { }
f06e8c58 Dmitry Vyukov 2017-06-22 11 static inline void kasan_check_write(const volatile void *p, unsigned int size)
f06e8c58 Dmitry Vyukov 2017-06-22 12 { }
64f8ebaf Andrey Ryabinin 2016-05-20 13 #endif
64f8ebaf Andrey Ryabinin 2016-05-20 14

:::::: The code at line 10 was first introduced by commit
:::::: f06e8c584fa0d05312c11ea66194f3d2efb93c21 kasan: Allow kasan_check_read/write() to accept pointers to volatiles

:::::: TO: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip