mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [colyli-bcache:nvdimm-meta 23/23] drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected
@ 2021-10-29  9:55 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-29  9:55 UTC (permalink / raw)
  To: Coly Li; +Cc: kbuild-all, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [colyli-bcache:nvdimm-meta 23/23] drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected
@ 2021-10-30 19:13 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-30 19:13 UTC (permalink / raw)
  To: Coly Li; +Cc: kbuild-all, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   ae554f9c5f1d65c3279a7a6e6881569487483403
commit: ae554f9c5f1d65c3279a7a6e6881569487483403 [23/23] bcache: store btree nodes on nvdimm
config: ia64-randconfig-r011-20211031 (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=ae554f9c5f1d65c3279a7a6e6881569487483403
        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 ae554f9c5f1d65c3279a7a6e6881569487483403
        # 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 arch/ia64/include/asm/pgtable.h:153,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/blk_types.h:10,
                    from include/linux/bio.h:11,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/btree.c:24:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                                ^~~~~~~
   In file included from drivers/md/bcache/nvmpg.h:8,
                    from drivers/md/bcache/btree.c:29:
   At top level:
   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	
   300	static void bch_btree_node_read(struct btree *b)
   301	{
   302		trace_bcache_btree_read(b);
   303	
   304		if (!KEY_NVMPG(&b->key))
   305			__bch_btree_node_read(b);
   306		else
 > 307			__bch_nvmpg_btree_node_read(b);
   308	}
   309	

---
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: 36741 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-30 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29  9:55 [colyli-bcache:nvdimm-meta 23/23] drivers/md/bcache/btree.c:287:9: warning: argument 2 null where non-null expected kernel test robot
2021-10-30 19:13 kernel test robot

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®