All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [hch-misc:swap_activate /12] block/fops.c:963:25: error: passing argument 3 of 'add_swap_extent' makes integer from pointer without a cast
Date: Tue, 12 May 2026 18:36:09 +0800	[thread overview]
Message-ID: <202605121802.seSugOoh-lkp@intel.com> (raw)

tree:   git://git.infradead.org/users/hch/misc.git swap_activate
head:   7414a67e6a700a2e9fef1fcd2ccce5592290e575
commit: 2596670a53e80bf99d7793cafc90e33db3899192 [/12] swap: push down setting sis->bdev into ->swap_activate
config: microblaze-defconfig (https://download.01.org/0day-ci/archive/20260512/202605121802.seSugOoh-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260512/202605121802.seSugOoh-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/202605121802.seSugOoh-lkp@intel.com/

All errors (new ones prefixed by >>):

   block/fops.c: In function 'blkdev_swap_activate':
>> block/fops.c:963:25: error: passing argument 3 of 'add_swap_extent' makes integer from pointer without a cast [-Wint-conversion]
     963 |                         I_BDEV(file->f_mapping->host), 0);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         struct block_device *
   In file included from include/linux/suspend.h:5,
                    from block/fops.c:17:
   include/linux/swap.h:531:49: note: expected 'long unsigned int' but argument is of type 'struct block_device *'
     531 |                                   unsigned long nr_pages, sector_t start_block)
         |                                   ~~~~~~~~~~~~~~^~~~~~~~


vim +/add_swap_extent +963 block/fops.c

   951	
   952	static int blkdev_swap_activate(struct file *file, struct swap_info_struct *sis)
   953	{
   954		loff_t isize = i_size_read(bdev_file_inode(file));
   955	
   956		/*
   957		 * The swap code performs arbitrary overwrites, which are not supported
   958		 * on zones with sequential write constraints.
   959		 */
   960		if (bdev_is_zoned(I_BDEV(file->f_mapping->host)))
   961			return -EINVAL;
   962		return add_swap_extent(sis, div_u64(isize, PAGE_SIZE),
 > 963				I_BDEV(file->f_mapping->host), 0);
   964	}
   965	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-05-12 10:36 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=202605121802.seSugOoh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hch@lst.de \
    --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 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.