[ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10 8861/9999] kernel/kcov.c:296:14: warning: conflicting types for built-in function '__sanitizer_cov_trace_switch'; expected 'void(long long unsigned int, void *)'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-kiwi-5.10
head:   b0f8b9f7d23884213c86f388be625777f61fb769
commit: c2985e13ddc87258e98fad13e435129a210092b6 [8861/9999] UPSTREAM: ubsan: enable for all*config builds
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220224/202202242354.7zL85dQI-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 11.2.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
        # https://github.com/ammarfaizi2/linux-block/commit/c2985e13ddc87258e98fad13e435129a210092b6
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-kiwi-5.10
        git checkout c2985e13ddc87258e98fad13e435129a210092b6
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> kernel/kcov.c:296:14: warning: conflicting types for built-in function '__sanitizer_cov_trace_switch'; expected 'void(long long unsigned int,  void *)' [-Wbuiltin-declaration-mismatch]
     296 | void notrace __sanitizer_cov_trace_switch(u64 val, u64 *cases)
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/asm-generic/bug.h:20,
                    from arch/powerpc/include/asm/bug.h:109,
                    from include/linux/bug.h:5,
                    from arch/powerpc/include/asm/cmpxchg.h:8,
                    from arch/powerpc/include/asm/atomic.h:11,
                    from include/linux/atomic.h:7,
                    from kernel/kcov.c:5:
   kernel/kcov.c:322:15: warning: conflicting types for built-in function '__sanitizer_cov_trace_switch'; expected 'void(long long unsigned int,  void *)' [-Wbuiltin-declaration-mismatch]
     322 | EXPORT_SYMBOL(__sanitizer_cov_trace_switch);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:125:28: note: in definition of macro '___EXPORT_SYMBOL'
     125 |         extern typeof(sym) sym;                                                 \
         |                            ^~~
   include/linux/export.h:187:41: note: in expansion of macro '__EXPORT_SYMBOL'
     187 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
         |                                         ^~~~~~~~~~~~~~~
   include/linux/export.h:190:41: note: in expansion of macro '_EXPORT_SYMBOL'
     190 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   kernel/kcov.c:322:1: note: in expansion of macro 'EXPORT_SYMBOL'
     322 | EXPORT_SYMBOL(__sanitizer_cov_trace_switch);
         | ^~~~~~~~~~~~~


vim +296 kernel/kcov.c

ded97d2c2b2c5f Victor Chibotaru 2017-11-17  295  
ded97d2c2b2c5f Victor Chibotaru 2017-11-17 @296  void notrace __sanitizer_cov_trace_switch(u64 val, u64 *cases)
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  297  {
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  298  	u64 i;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  299  	u64 count = cases[0];
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  300  	u64 size = cases[1];
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  301  	u64 type = KCOV_CMP_CONST;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  302  
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  303  	switch (size) {
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  304  	case 8:
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  305  		type |= KCOV_CMP_SIZE(0);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  306  		break;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  307  	case 16:
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  308  		type |= KCOV_CMP_SIZE(1);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  309  		break;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  310  	case 32:
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  311  		type |= KCOV_CMP_SIZE(2);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  312  		break;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  313  	case 64:
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  314  		type |= KCOV_CMP_SIZE(3);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  315  		break;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  316  	default:
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  317  		return;
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  318  	}
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  319  	for (i = 0; i < count; i++)
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  320  		write_comp_data(type, cases[i + 2], val, _RET_IP_);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  321  }
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  322  EXPORT_SYMBOL(__sanitizer_cov_trace_switch);
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  323  #endif /* ifdef CONFIG_KCOV_ENABLE_COMPARISONS */
ded97d2c2b2c5f Victor Chibotaru 2017-11-17  324  

:::::: The code at line 296 was first introduced by commit
:::::: ded97d2c2b2c5f1dcced0bc57133f7753b037dfc kcov: support comparison operands collection

:::::: TO: Victor Chibotaru <tchibo@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux