Hi Nadav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17 next-20180604]
[cannot apply to tip/x86/core]
[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/Nadav-Amit/x86-macrofying-inline-asm-for-better-compilation/20180605-124313
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   In file included from include/linux/bug.h:5:0,
                    from include/linux/crypto.h:23,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/ktime.h: In function 'ktime_divns':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/ktime.h:150:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(div < 0);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_insert_fast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/rhashtable.h:936:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(ht->p.obj_hashfn);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_get_insert_fast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:962:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(ht->p.obj_hashfn);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_insert_key':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:996:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!ht->p.obj_hashfn || !key);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_get_insert_key':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:1020:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!ht->p.obj_hashfn || !key);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_blkcipher_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/crypto.h:1118:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_BLKCIPHER);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_cipher_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/crypto.h:1438:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_comp_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/crypto.h:1603:2: note: in expansion of macro 'BUG_ON'
     BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_COMPRESS) &
     ^~~~~~
   include/linux/quota.h: In function 'make_kqid':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
>> include/linux/quota.h:114:3: note: in expansion of macro 'BUG'
      BUG();
      ^~~
   include/linux/quota.h: In function 'make_kqid_invalid':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/linux/quota.h:141:3: note: in expansion of macro 'BUG'
      BUG();
      ^~~
   include/linux/fs.h: In function 'kill_block_super':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
>> include/linux/fs.h:2124:2: note: in expansion of macro 'BUG'
     BUG();
     ^~~
   include/linux/fs.h: In function 'break_deleg_wait':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/linux/fs.h:2371:2: note: in expansion of macro 'BUG'
     BUG();
     ^~~
   include/linux/seq_file.h: In function 'seq_get_buf':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/seq_file.h:66:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(m->count > m->size);
     ^~~~~~
   include/linux/seq_file.h: In function 'seq_commit':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to 
>> incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/seq_file.h:89:3: note: in expansion of macro 'BUG_ON'
      BUG_ON(m->count + num > m->size);
      ^~~~~~
   include/asm-generic/fixmap.h: In function 'virt_to_fix':

vim +31 arch/x86/include/asm/bug.h

9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  24  
9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  25  #define 
_BUG_FLAGS(ins, flags)                                              \
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  26  do {        
                                                                \
6eca12b3 arch/x86/include/asm/bug.h Nadav Amit      2018-06-04  27      asm 
volatile("ASM_BUG ins=\"" ins "\" file=%c0 line=%c1 "       \
6eca12b3 arch/x86/include/asm/bug.h Nadav Amit      2018-06-04  28              
     "flags=%c2 size=%c3"                               \
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  29              
     : : "i" (__FILE__), "i" (__LINE__),                \
9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  30              
         "i" (flags),                                   \
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17 @31              
         "i" (sizeof(struct bug_entry)));               \
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  32  } while (0)
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  33  

:::::: The code at line 31 was first introduced by commit
:::::: 68fdc55c48fd2e8f4938a1e815216c25baf8a17e x86: unify 
include/asm/bug_32/64.h

:::::: TO: Thomas Gleixner <t...@linutronix.de>
:::::: CC: Thomas Gleixner <t...@inhelltoy.tec.linutronix.de>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to