All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hch-block:blkdev.h-includes 15/16] fs/block_dev.c:734:23: error: implicit declaration of function 'bdev_get_integrity'
Date: Sun, 25 Jul 2021 02:56:38 +0800	[thread overview]
Message-ID: <202107250232.5iPCAdlN-lkp@intel.com> (raw)

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

tree:   git://git.infradead.org/users/hch/block.git blkdev.h-includes
head:   48f7fda047613ceec07881f14a5eaf1ee19d4433
commit: e7a8094f7da3b6e7c7a853afa0dd9d7e40fafff2 [15/16] block: move integrity handling out of blkdev.h
config: i386-randconfig-s001-20210724 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add hch-block git://git.infradead.org/users/hch/block.git
        git fetch --no-tags hch-block blkdev.h-includes
        git checkout e7a8094f7da3b6e7c7a853afa0dd9d7e40fafff2
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/block_dev.c: In function 'bdev_read_page':
>> fs/block_dev.c:734:23: error: implicit declaration of function 'bdev_get_integrity' [-Werror=implicit-function-declaration]
     734 |  if (!ops->rw_page || bdev_get_integrity(bdev))
         |                       ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/blkdev.h:7,
                    from fs/block_dev.c:16:
   At top level:
   include/linux/genhd.h:329:12: warning: 'bd_register_pending_holders' defined but not used [-Wunused-function]
     329 | static int bd_register_pending_holders(struct gendisk *disk)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bdev_get_integrity +734 fs/block_dev.c

^1da177e4c3f41 Linus Torvalds    2005-04-16  711  
47a191fd38ebdd Matthew Wilcox    2014-06-04  712  /**
47a191fd38ebdd Matthew Wilcox    2014-06-04  713   * bdev_read_page() - Start reading a page from a block device
47a191fd38ebdd Matthew Wilcox    2014-06-04  714   * @bdev: The device to read the page from
47a191fd38ebdd Matthew Wilcox    2014-06-04  715   * @sector: The offset on the device to read the page to (need not be aligned)
47a191fd38ebdd Matthew Wilcox    2014-06-04  716   * @page: The page to read
47a191fd38ebdd Matthew Wilcox    2014-06-04  717   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  718   * On entry, the page should be locked.  It will be unlocked when the page
47a191fd38ebdd Matthew Wilcox    2014-06-04  719   * has been read.  If the block driver implements rw_page synchronously,
47a191fd38ebdd Matthew Wilcox    2014-06-04  720   * that will be true on exit from this function, but it need not be.
47a191fd38ebdd Matthew Wilcox    2014-06-04  721   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  722   * Errors returned by this function are usually "soft", eg out of memory, or
47a191fd38ebdd Matthew Wilcox    2014-06-04  723   * queue full; callers should try a different route to read this page rather
47a191fd38ebdd Matthew Wilcox    2014-06-04  724   * than propagate an error back up the stack.
47a191fd38ebdd Matthew Wilcox    2014-06-04  725   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  726   * Return: negative errno if an error occurs, 0 if submission was successful.
47a191fd38ebdd Matthew Wilcox    2014-06-04  727   */
47a191fd38ebdd Matthew Wilcox    2014-06-04  728  int bdev_read_page(struct block_device *bdev, sector_t sector,
47a191fd38ebdd Matthew Wilcox    2014-06-04  729  			struct page *page)
47a191fd38ebdd Matthew Wilcox    2014-06-04  730  {
47a191fd38ebdd Matthew Wilcox    2014-06-04  731  	const struct block_device_operations *ops = bdev->bd_disk->fops;
2e6edc95382cc3 Dan Williams      2015-11-19  732  	int result = -EOPNOTSUPP;
2e6edc95382cc3 Dan Williams      2015-11-19  733  
f68eb1e71a9276 Vishal Verma      2015-05-12 @734  	if (!ops->rw_page || bdev_get_integrity(bdev))
2e6edc95382cc3 Dan Williams      2015-11-19  735  		return result;
2e6edc95382cc3 Dan Williams      2015-11-19  736  
e556f6ba10f0f3 Christoph Hellwig 2020-06-26  737  	result = blk_queue_enter(bdev->bd_disk->queue, 0);
2e6edc95382cc3 Dan Williams      2015-11-19  738  	if (result)
2e6edc95382cc3 Dan Williams      2015-11-19  739  		return result;
3f289dcb4b2654 Tejun Heo         2018-07-18  740  	result = ops->rw_page(bdev, sector + get_start_sect(bdev), page,
3f289dcb4b2654 Tejun Heo         2018-07-18  741  			      REQ_OP_READ);
e556f6ba10f0f3 Christoph Hellwig 2020-06-26  742  	blk_queue_exit(bdev->bd_disk->queue);
2e6edc95382cc3 Dan Williams      2015-11-19  743  	return result;
47a191fd38ebdd Matthew Wilcox    2014-06-04  744  }
47a191fd38ebdd Matthew Wilcox    2014-06-04  745  

:::::: The code at line 734 was first introduced by commit
:::::: f68eb1e71a92765ffd8eb68466a41b48f2fbba04 fs/block_dev.c: skip rw_page if bdev has integrity

:::::: TO: Vishal Verma <vishal.l.verma@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [hch-block:blkdev.h-includes 15/16] fs/block_dev.c:734:23: error: implicit declaration of function 'bdev_get_integrity'
Date: Sun, 25 Jul 2021 02:56:38 +0800	[thread overview]
Message-ID: <202107250232.5iPCAdlN-lkp@intel.com> (raw)

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

tree:   git://git.infradead.org/users/hch/block.git blkdev.h-includes
head:   48f7fda047613ceec07881f14a5eaf1ee19d4433
commit: e7a8094f7da3b6e7c7a853afa0dd9d7e40fafff2 [15/16] block: move integrity handling out of blkdev.h
config: i386-randconfig-s001-20210724 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add hch-block git://git.infradead.org/users/hch/block.git
        git fetch --no-tags hch-block blkdev.h-includes
        git checkout e7a8094f7da3b6e7c7a853afa0dd9d7e40fafff2
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/block_dev.c: In function 'bdev_read_page':
>> fs/block_dev.c:734:23: error: implicit declaration of function 'bdev_get_integrity' [-Werror=implicit-function-declaration]
     734 |  if (!ops->rw_page || bdev_get_integrity(bdev))
         |                       ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/blkdev.h:7,
                    from fs/block_dev.c:16:
   At top level:
   include/linux/genhd.h:329:12: warning: 'bd_register_pending_holders' defined but not used [-Wunused-function]
     329 | static int bd_register_pending_holders(struct gendisk *disk)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bdev_get_integrity +734 fs/block_dev.c

^1da177e4c3f41 Linus Torvalds    2005-04-16  711  
47a191fd38ebdd Matthew Wilcox    2014-06-04  712  /**
47a191fd38ebdd Matthew Wilcox    2014-06-04  713   * bdev_read_page() - Start reading a page from a block device
47a191fd38ebdd Matthew Wilcox    2014-06-04  714   * @bdev: The device to read the page from
47a191fd38ebdd Matthew Wilcox    2014-06-04  715   * @sector: The offset on the device to read the page to (need not be aligned)
47a191fd38ebdd Matthew Wilcox    2014-06-04  716   * @page: The page to read
47a191fd38ebdd Matthew Wilcox    2014-06-04  717   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  718   * On entry, the page should be locked.  It will be unlocked when the page
47a191fd38ebdd Matthew Wilcox    2014-06-04  719   * has been read.  If the block driver implements rw_page synchronously,
47a191fd38ebdd Matthew Wilcox    2014-06-04  720   * that will be true on exit from this function, but it need not be.
47a191fd38ebdd Matthew Wilcox    2014-06-04  721   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  722   * Errors returned by this function are usually "soft", eg out of memory, or
47a191fd38ebdd Matthew Wilcox    2014-06-04  723   * queue full; callers should try a different route to read this page rather
47a191fd38ebdd Matthew Wilcox    2014-06-04  724   * than propagate an error back up the stack.
47a191fd38ebdd Matthew Wilcox    2014-06-04  725   *
47a191fd38ebdd Matthew Wilcox    2014-06-04  726   * Return: negative errno if an error occurs, 0 if submission was successful.
47a191fd38ebdd Matthew Wilcox    2014-06-04  727   */
47a191fd38ebdd Matthew Wilcox    2014-06-04  728  int bdev_read_page(struct block_device *bdev, sector_t sector,
47a191fd38ebdd Matthew Wilcox    2014-06-04  729  			struct page *page)
47a191fd38ebdd Matthew Wilcox    2014-06-04  730  {
47a191fd38ebdd Matthew Wilcox    2014-06-04  731  	const struct block_device_operations *ops = bdev->bd_disk->fops;
2e6edc95382cc3 Dan Williams      2015-11-19  732  	int result = -EOPNOTSUPP;
2e6edc95382cc3 Dan Williams      2015-11-19  733  
f68eb1e71a9276 Vishal Verma      2015-05-12 @734  	if (!ops->rw_page || bdev_get_integrity(bdev))
2e6edc95382cc3 Dan Williams      2015-11-19  735  		return result;
2e6edc95382cc3 Dan Williams      2015-11-19  736  
e556f6ba10f0f3 Christoph Hellwig 2020-06-26  737  	result = blk_queue_enter(bdev->bd_disk->queue, 0);
2e6edc95382cc3 Dan Williams      2015-11-19  738  	if (result)
2e6edc95382cc3 Dan Williams      2015-11-19  739  		return result;
3f289dcb4b2654 Tejun Heo         2018-07-18  740  	result = ops->rw_page(bdev, sector + get_start_sect(bdev), page,
3f289dcb4b2654 Tejun Heo         2018-07-18  741  			      REQ_OP_READ);
e556f6ba10f0f3 Christoph Hellwig 2020-06-26  742  	blk_queue_exit(bdev->bd_disk->queue);
2e6edc95382cc3 Dan Williams      2015-11-19  743  	return result;
47a191fd38ebdd Matthew Wilcox    2014-06-04  744  }
47a191fd38ebdd Matthew Wilcox    2014-06-04  745  

:::::: The code at line 734 was first introduced by commit
:::::: f68eb1e71a92765ffd8eb68466a41b48f2fbba04 fs/block_dev.c: skip rw_page if bdev has integrity

:::::: TO: Vishal Verma <vishal.l.verma@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

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

             reply	other threads:[~2021-07-24 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 18:56 kernel test robot [this message]
2021-07-24 18:56 ` [hch-block:blkdev.h-includes 15/16] fs/block_dev.c:734:23: error: implicit declaration of function 'bdev_get_integrity' 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=202107250232.5iPCAdlN-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.