All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [bcache:for-next 12/14] drivers/md/bcache/journal.c:802:20: warning: cast to pointer from integer of different size
Date: Thu, 03 Jun 2021 01:13:37 +0800	[thread overview]
Message-ID: <202106030133.VMPNNG3Z-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git for-next
head:   a019aef1d302e9dbc0b1d05f3a23d1220592c738
commit: 57f10cce2309fb555394d529e4b2ab9a7cc78f29 [12/14] bcache: support storing bcache journal into NVDIMM meta device
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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=57f10cce2309fb555394d529e4b2ab9a7cc78f29
        git remote add bcache https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
        git fetch --no-tags bcache for-next
        git checkout 57f10cce2309fb555394d529e4b2ab9a7cc78f29
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

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/journal.c: In function '__journal_nvdimm_write_unlocked':
>> drivers/md/bcache/journal.c:802:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     802 |  memcpy_flushcache((void *)c->journal.key.ptr[0], w->data, sectors << 9);
         |                    ^
   drivers/md/bcache/journal.c: In function 'find_journal_nvm_base':
   drivers/md/bcache/journal.c:1041:53: error: dereferencing pointer to incomplete type 'struct bch_nvm_pages_owner_head'
    1041 |  struct bch_nvm_pgalloc_recs *recs_list = owner_list->recs[0];
         |                                                     ^~
   drivers/md/bcache/journal.c:1049:18: error: dereferencing pointer to incomplete type 'struct bch_nvm_pgalloc_recs'
    1049 |   rec = recs_list->recs;
         |                  ^~
   drivers/md/bcache/journal.c:1051:11: error: dereferencing pointer to incomplete type 'struct bch_pgalloc_rec'
    1051 |    if (rec->pgoff == jnl_pgoff)
         |           ^~
   drivers/md/bcache/journal.c:1053:7: error: increment of pointer to an incomplete type 'struct bch_pgalloc_rec'
    1053 |    rec++;
         |       ^~
   drivers/md/bcache/journal.c: In function '__bch_journal_nvdimm_init':
   drivers/md/bcache/journal.c:1105:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1105 |    (u64)(journal_nvm_base + (ca->sb.bucket_size * i));
         |    ^
--
   drivers/md/bcache/super.c: In function 'cache_set_free':
>> drivers/md/bcache/super.c:1705:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    1705 |      (void *)(ca->sb.d[i] + offset), len);
         |      ^


vim +802 drivers/md/bcache/journal.c

   791	
   792	static void __journal_nvdimm_write_unlocked(struct cache_set *c)
   793		__releases(c->journal.lock)
   794	{
   795		struct journal_write *w = c->journal.cur;
   796		struct cache *ca = c->cache;
   797		unsigned int sectors;
   798	
   799		sectors = set_blocks(w->data, block_bytes(ca)) * ca->sb.block_size;
   800		atomic_long_add(sectors, &ca->meta_sectors_written);
   801	
 > 802		memcpy_flushcache((void *)c->journal.key.ptr[0], w->data, sectors << 9);
   803	
   804		c->journal.key.ptr[0] += sectors << 9;
   805		ca->journal.seq[ca->journal.cur_idx] = w->data->seq;
   806	
   807		atomic_dec_bug(&fifo_back(&c->journal.pin));
   808		bch_journal_next(&c->journal);
   809		journal_reclaim(c);
   810	
   811		spin_unlock(&c->journal.lock);
   812	}
   813	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68181 bytes --]

                 reply	other threads:[~2021-06-02 17:13 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=202106030133.VMPNNG3Z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.