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 23/23] drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected
Date: Fri, 29 Oct 2021 17:55:20 +0800	[thread overview]
Message-ID: <202110291711.QbPFltJt-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5483 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   544e57301b9adc7628556f4b709f65c35142df47
commit: 544e57301b9adc7628556f4b709f65c35142df47 [23/23] bcache: store btree nodes on nvdimm
config: ia64-randconfig-r002-20211028 (attached as .config)
compiler: ia64-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://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?id=544e57301b9adc7628556f4b709f65c35142df47
        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 544e57301b9adc7628556f4b709f65c35142df47
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
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/btree.c:29:
   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 function '__bch_nvmpg_btree_node_read',
       inlined from 'bch_btree_node_read' at drivers/md/bcache/btree.c:307:3:
>> drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected [-Wnonnull]
     287 |         memcpy(b->keys.set[0].data, ptr, KEY_SIZE(&b->key) << 9);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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/btree.c:24:
   drivers/md/bcache/btree.c: In function 'bch_btree_node_read':
   arch/ia64/include/asm/string.h:19:14: note: in a call to function 'memcpy' declared 'nonnull'
      19 | extern void *memcpy (void *, const void *, __kernel_size_t);
         |              ^~~~~~
   In file included from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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/btree.c:24:
   In function 'memcpy_flushcache',
       inlined from '__do_nvmpg_btree_node_write' at drivers/md/bcache/btree.c:475:2,
       inlined from 'do_btree_node_write' at drivers/md/bcache/btree.c:491:3,
       inlined from '__bch_btree_node_write' at drivers/md/bcache/btree.c:517:2:
>> include/linux/string.h:167:9: warning: argument 1 null where non-null expected [-Wnonnull]
     167 |         memcpy(dst, src, cnt);
         |         ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    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/btree.c:24:
   drivers/md/bcache/btree.c: In function '__bch_btree_node_write':
   arch/ia64/include/asm/string.h:19:14: note: in a call to function 'memcpy' declared 'nonnull'
      19 | extern void *memcpy (void *, const void *, __kernel_size_t);
         |              ^~~~~~


vim +287 drivers/md/bcache/btree.c

   280	
   281	static void __bch_nvmpg_btree_node_read(struct btree *b)
   282	{
   283		uint64_t start_time = local_clock();
   284		void *ptr;
   285	
   286		ptr = bkey_offset_to_nvmpg_ptr(PTR_OFFSET(&b->key, 0));
 > 287		memcpy(b->keys.set[0].data, ptr, KEY_SIZE(&b->key) << 9);
   288	
   289		if (btree_node_io_error(b))
   290			goto err;
   291	
   292		bch_btree_node_read_done(b);
   293		bch_time_stats_update(&b->c->btree_read_time, start_time);
   294	
   295	err:
   296		bch_cache_set_error(b->c,
   297			"io error reading NVDIMM pages at 0x%p\n", ptr);
   298	}
   299	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28477 bytes --]

             reply	other threads:[~2021-10-29  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  9:55 kernel test robot [this message]
2021-10-30 19:13 kernel test robot

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=202110291711.QbPFltJt-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®