lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207060229.nZBDhhNX-lkp@intel.com>
Date:   Wed, 6 Jul 2022 02:48:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Coly Li <colyli@...e.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [colyli-bcache:nvdimm-meta 16/16]
 arch/alpha/include/asm/string.h:37:32: warning: argument 1 null where
 non-null expected

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   5c8259ab2129816fc49fd6d060206ba61b0594d1
commit: 5c8259ab2129816fc49fd6d060206ba61b0594d1 [16/16] bcache: support storing bcache btree nodes into NVDIMM meta device
config: alpha-randconfig-r013-20220703 (https://download.01.org/0day-ci/archive/20220706/202207060229.nZBDhhNX-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?id=5c8259ab2129816fc49fd6d060206ba61b0594d1
        git remote add colyli-bcache https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
        git fetch --no-tags colyli-bcache nvdimm-meta
        git checkout 5c8259ab2129816fc49fd6d060206ba61b0594d1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/md/bcache/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/md/bcache/nvmpg.h:8,
                    from drivers/md/bcache/alloc.c:66:
   drivers/md/bcache/nvmpg_format.h:132:19: warning: 'bch_nvmpg_recs_magic' defined but not used [-Wunused-const-variable=]
     132 | static const __u8 bch_nvmpg_recs_magic[] = {
         |                   ^~~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/nvmpg_format.h:129:19: warning: 'bch_nvmpg_magic' defined but not used [-Wunused-const-variable=]
     129 | static const __u8 bch_nvmpg_magic[] = {
         |                   ^~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from include/linux/wait.h:9,
                    from include/linux/mempool.h:8,
                    from include/linux/bio.h:8,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/alloc.c:64:
   In function '__memset',
       inlined from '__bch_nvmpg_bucket_free' at drivers/md/bcache/alloc.c:488:2,
       inlined from 'bch_bucket_free' at drivers/md/bcache/alloc.c:497:3:
>> arch/alpha/include/asm/string.h:37:32: warning: argument 1 null where non-null expected [-Wnonnull]
      37 |                         return __builtin_memset(s, c, n);
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/alloc.c: In function 'bch_bucket_free':
   arch/alpha/include/asm/string.h:37:32: note: in a call to built-in function '__builtin_memset'


vim +37 arch/alpha/include/asm/string.h

^1da177e4c3f41 include/asm-alpha/string.h      Linus Torvalds    2005-04-16  29  
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  30  /* For gcc 3.x, we cannot have the inline function named "memset" because
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  31     the __builtin_memset will attempt to resolve to the inline as well,
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  32     leading to a "sorry" about unimplemented recursive inlining.  */
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  33  extern inline void *__memset(void *s, int c, size_t n)
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  34  {
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  35  	if (__builtin_constant_p(c)) {
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  36  		if (__builtin_constant_p(n)) {
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11 @37  			return __builtin_memset(s, c, n);
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  38  		} else {
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  39  			unsigned long c8 = (c & 0xff) * 0x0101010101010101UL;
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  40  			return __constant_c_memset(s, c8, n);
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  41  		}
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  42  	}
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  43  	return ___memset(s, c, n);
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  44  }
a47e5bb5764f02 arch/alpha/include/asm/string.h Richard Henderson 2013-07-11  45  

:::::: The code at line 37 was first introduced by commit
:::::: a47e5bb5764f029f989a182b0dd2d4cce69f8b14 alpha: Eliminate compiler warning from memset macro

:::::: TO: Richard Henderson <rth@...ddle.net>
:::::: CC: Matt Turner <mattst88@...il.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ