mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Coly Li <colyli@suse.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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
Date: Wed, 6 Jul 2022 02:48:54 +0800	[thread overview]
Message-ID: <202207060229.nZBDhhNX-lkp@intel.com> (raw)

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@intel.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@twiddle.net>
:::::: CC: Matt Turner <mattst88@gmail.com>

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

                 reply	other threads:[~2022-07-05 18:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207060229.nZBDhhNX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=colyli@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®