public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kmo@daterainc.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
Date: Mon, 20 Nov 2023 05:44:37 +0800	[thread overview]
Message-ID: <202311200512.l1n53SlO-lkp@intel.com> (raw)

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

             reply	other threads:[~2023-11-19 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-19 21:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-03  6:07 fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer 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=202311200512.l1n53SlO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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