* fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
@ 2023-11-19 21:44 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-11-19 21:44 UTC (permalink / raw)
To: Kent Overstreet; +Cc: oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 037266a5f7239ead1530266f7d7af153d2a867fa
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date: 4 weeks ago
config: hexagon-randconfig-r121-20231119 (https://download.01.org/0day-ci/archive/20231120/202311200512.l1n53SlO-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20231120/202311200512.l1n53SlO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311200512.l1n53SlO-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
fs/bcachefs/btree_cache.c:468:15: sparse: sparse: Using plain integer as NULL pointer
fs/bcachefs/btree_cache.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
fs/bcachefs/btree_cache.c: note: in included file (through include/linux/backing-dev-defs.h, fs/bcachefs/bcachefs.h):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +456 fs/bcachefs/btree_cache.c
450
451 int bch2_btree_cache_cannibalize_lock(struct bch_fs *c, struct closure *cl)
452 {
453 struct btree_cache *bc = &c->btree_cache;
454 struct task_struct *old;
455
> 456 old = cmpxchg(&bc->alloc_lock, NULL, current);
457 if (old == NULL || old == current)
458 goto success;
459
460 if (!cl) {
461 trace_btree_node_cannibalize_lock_fail(c);
462 return -ENOMEM;
463 }
464
465 closure_wait(&bc->alloc_wait, cl);
466
467 /* Try again, after adding ourselves to waitlist */
468 old = cmpxchg(&bc->alloc_lock, NULL, current);
469 if (old == NULL || old == current) {
470 /* We raced */
471 closure_wake_up(&bc->alloc_wait);
472 goto success;
473 }
474
475 trace_btree_node_cannibalize_lock_fail(c);
476 return -EAGAIN;
477
478 success:
479 trace_btree_node_cannibalize_lock(c);
480 return 0;
481 }
482
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
@ 2023-12-03 6:07 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-12-03 6:07 UTC (permalink / raw)
To: Kent Overstreet; +Cc: oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date: 6 weeks ago
config: hexagon-randconfig-r121-20231119 (https://download.01.org/0day-ci/archive/20231202/202312021327.zVWlbqlu-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20231202/202312021327.zVWlbqlu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312021327.zVWlbqlu-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
fs/bcachefs/btree_cache.c:468:15: sparse: sparse: Using plain integer as NULL pointer
fs/bcachefs/btree_cache.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
fs/bcachefs/btree_cache.c: note: in included file (through include/linux/backing-dev-defs.h, fs/bcachefs/bcachefs.h):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +456 fs/bcachefs/btree_cache.c
450
451 int bch2_btree_cache_cannibalize_lock(struct bch_fs *c, struct closure *cl)
452 {
453 struct btree_cache *bc = &c->btree_cache;
454 struct task_struct *old;
455
> 456 old = cmpxchg(&bc->alloc_lock, NULL, current);
457 if (old == NULL || old == current)
458 goto success;
459
460 if (!cl) {
461 trace_btree_node_cannibalize_lock_fail(c);
462 return -ENOMEM;
463 }
464
465 closure_wait(&bc->alloc_wait, cl);
466
467 /* Try again, after adding ourselves to waitlist */
468 old = cmpxchg(&bc->alloc_lock, NULL, current);
469 if (old == NULL || old == current) {
470 /* We raced */
471 closure_wake_up(&bc->alloc_wait);
472 goto success;
473 }
474
475 trace_btree_node_cannibalize_lock_fail(c);
476 return -EAGAIN;
477
478 success:
479 trace_btree_node_cannibalize_lock(c);
480 return 0;
481 }
482
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-03 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-19 21:44 fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-12-03 6:07 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