mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: include/linux/radix-tree.h:199:16: sparse: expression using sizeof(void)
Date: Fri, 26 Aug 2016 10:33:12 +0800	[thread overview]
Message-ID: <201608261000.ADncBbj4%fengguang.wu@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   61c04572de404e52a655a36752e696bbcb483cf5
commit: 112dc0c8069e5554e0ad29c58228f1e6ca49e13d locking/barriers: Suppress sparse warnings in lockless_dereference()
date:   8 days ago
reproduce:
        # apt-get install sparse
        git checkout 112dc0c8069e5554e0ad29c58228f1e6ca49e13d
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> include/linux/radix-tree.h:199:16: sparse: expression using sizeof(void)
   include/linux/radix-tree.h:199:16: sparse: incompatible types in comparison expression (different address spaces)

vim +199 include/linux/radix-tree.h

7cf9c2c7 Nick Piggin 2006-12-06  183  
7cf9c2c7 Nick Piggin 2006-12-06  184  /**
7cf9c2c7 Nick Piggin 2006-12-06  185   * radix_tree_deref_slot	- dereference a slot
7cf9c2c7 Nick Piggin 2006-12-06  186   * @pslot:	pointer to slot, returned by radix_tree_lookup_slot
7cf9c2c7 Nick Piggin 2006-12-06  187   * Returns:	item that was stored in that slot with any direct pointer flag
7cf9c2c7 Nick Piggin 2006-12-06  188   *		removed.
7cf9c2c7 Nick Piggin 2006-12-06  189   *
7cf9c2c7 Nick Piggin 2006-12-06  190   * For use with radix_tree_lookup_slot().  Caller must hold tree at least read
27d20fdd Nick Piggin 2010-11-11  191   * locked across slot lookup and dereference. Not required if write lock is
27d20fdd Nick Piggin 2010-11-11  192   * held (ie. items cannot be concurrently inserted).
27d20fdd Nick Piggin 2010-11-11  193   *
27d20fdd Nick Piggin 2010-11-11  194   * radix_tree_deref_retry must be used to confirm validity of the pointer if
27d20fdd Nick Piggin 2010-11-11  195   * only the read lock is held.
7cf9c2c7 Nick Piggin 2006-12-06  196   */
7cf9c2c7 Nick Piggin 2006-12-06  197  static inline void *radix_tree_deref_slot(void **pslot)
7cf9c2c7 Nick Piggin 2006-12-06  198  {
27d20fdd Nick Piggin 2010-11-11 @199  	return rcu_dereference(*pslot);
7cf9c2c7 Nick Piggin 2006-12-06  200  }
27d20fdd Nick Piggin 2010-11-11  201  
27d20fdd Nick Piggin 2010-11-11  202  /**
29c1f677 Mel Gorman  2011-01-13  203   * radix_tree_deref_slot_protected	- dereference a slot without RCU lock but with tree lock held
29c1f677 Mel Gorman  2011-01-13  204   * @pslot:	pointer to slot, returned by radix_tree_lookup_slot
29c1f677 Mel Gorman  2011-01-13  205   * Returns:	item that was stored in that slot with any direct pointer flag
29c1f677 Mel Gorman  2011-01-13  206   *		removed.
29c1f677 Mel Gorman  2011-01-13  207   *

:::::: The code at line 199 was first introduced by commit
:::::: 27d20fddc8af539464fc3ba499d6a830054c3bd6 radix-tree: fix RCU bug

:::::: TO: Nick Piggin <npiggin@kernel.dk>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

                 reply	other threads:[~2016-08-26  2:33 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=201608261000.ADncBbj4%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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®