public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/md/bcache/util.c:280:16: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *'))
@ 2021-11-15 21:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-15 21:02 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: llvm, kbuild-all, linux-kernel, 0day robot

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

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20211105-042601/Coly-Li/bcache-Revert-bcache-use-bvec_virt/20211103-231427
head:   d9060ab757bd509ac3746469f23bf3e22a53f8ea
commit: d9060ab757bd509ac3746469f23bf3e22a53f8ea bcache: Revert "bcache: use bvec_virt"
date:   11 days ago
config: i386-randconfig-a005-20211105 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 847a6807332b13f43704327c2d30103ec0347c77)
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://github.com/0day-ci/linux/commit/d9060ab757bd509ac3746469f23bf3e22a53f8ea
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review UPDATE-20211105-042601/Coly-Li/bcache-Revert-bcache-use-bvec_virt/20211103-231427
        git checkout d9060ab757bd509ac3746469f23bf3e22a53f8ea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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 >>):

>> drivers/md/bcache/util.c:280:16: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   size_t len = min(size, PAGE_SIZE - offset);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:45:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.


vim +280 drivers/md/bcache/util.c

   257	
   258	/**
   259	 * bch_bio_alloc_pages - allocates a single page for each bvec in a bio
   260	 * @bio: bio to allocate pages for
   261	 * @data: if non-NULL copy data from here into the newly allocate pages
   262	 * @size: size to allocate
   263	 * @gfp_mask: flags for allocation
   264	 *
   265	 * Allocates pages up to @bio->bi_vcnt.
   266	 *
   267	 * Returns 0 on success, -ENOMEM on failure. On failure, any allocated pages are
   268	 * freed.
   269	 */
   270	int bch_bio_alloc_pages(struct bio *bio, void *data, size_t size, gfp_t gfp)
   271	{
   272		struct bvec_iter iter;
   273		struct bio_vec bv;
   274	
   275		BUG_ON(bio->bi_vcnt);
   276	
   277		while (size) {
   278			struct page *page = alloc_page(gfp);
   279			unsigned int offset = offset_in_page(page);
 > 280			size_t len = min(size, PAGE_SIZE - offset);

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-16  0:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-15 21:02 drivers/md/bcache/util.c:280:16: warning: comparison of distinct pointer types ('typeof (size) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *')) 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