[cifs:for-next 20/25] fs/netfs/iterator.c:65:9: error: call to undeclared function 'iov_iter_extract_pages'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.samba.org/sfrench/cifs-2.6.git for-next
head:   2259206443e31ea6a266adcf0d900fbea17016ec
commit: d1df0021a8275ef2e0d455b384e78e18e57cf9f2 [20/25] netfs: Add a function to extract a UBUF or IOVEC into a BVEC iterator
config: arm-buildonly-randconfig-r005-20230213 (https://download.01.org/0day-ci/archive/20230213/202302130853.kU76MQRK-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db0e6591612b53910a1b366863348bdb9d7d2fb1)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
        git fetch --no-tags cifs for-next
        git checkout d1df0021a8275ef2e0d455b384e78e18e57cf9f2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/netfs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202302130853.kU76MQRK-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from fs/netfs/iterator.c:11:
   include/linux/netfs.h:302:5: error: unknown type name 'iov_iter_extraction_t'
                                   iov_iter_extraction_t extraction_flags);
                                   ^
   fs/netfs/iterator.c:36:5: error: unknown type name 'iov_iter_extraction_t'
                                   iov_iter_extraction_t extraction_flags)
                                   ^
>> fs/netfs/iterator.c:65:9: error: call to undeclared function 'iov_iter_extract_pages'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   ret = iov_iter_extract_pages(orig, &pages, count,
                         ^
   fs/netfs/iterator.c:65:9: note: did you mean 'iov_iter_get_pages'?
   include/linux/uio.h:253:9: note: 'iov_iter_get_pages' declared here
   ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages,
           ^
   3 errors generated.


vim +/iov_iter_extract_pages +65 fs/netfs/iterator.c

    13	
    14	/**
    15	 * netfs_extract_user_iter - Extract the pages from a user iterator into a bvec
    16	 * @orig: The original iterator
    17	 * @orig_len: The amount of iterator to copy
    18	 * @new: The iterator to be set up
    19	 * @extraction_flags: Flags to qualify the request
    20	 *
    21	 * Extract the page fragments from the given amount of the source iterator and
    22	 * build up a second iterator that refers to all of those bits.  This allows
    23	 * the original iterator to disposed of.
    24	 *
    25	 * @extraction_flags can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be
    26	 * allowed on the pages extracted.
    27	 *
    28	 * On success, the number of elements in the bvec is returned, the original
    29	 * iterator will have been advanced by the amount extracted.
    30	 *
    31	 * The iov_iter_extract_mode() function should be used to query how cleanup
    32	 * should be performed.
    33	 */
    34	ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len,
    35					struct iov_iter *new,
    36					iov_iter_extraction_t extraction_flags)
    37	{
    38		struct bio_vec *bv = NULL;
    39		struct page **pages;
    40		unsigned int cur_npages;
    41		unsigned int max_pages;
    42		unsigned int npages = 0;
    43		unsigned int i;
    44		ssize_t ret;
    45		size_t count = orig_len, offset, len;
    46		size_t bv_size, pg_size;
    47	
    48		if (WARN_ON_ONCE(!iter_is_ubuf(orig) && !iter_is_iovec(orig)))
    49			return -EIO;
    50	
    51		max_pages = iov_iter_npages(orig, INT_MAX);
    52		bv_size = array_size(max_pages, sizeof(*bv));
    53		bv = kvmalloc(bv_size, GFP_KERNEL);
    54		if (!bv)
    55			return -ENOMEM;
    56	
    57		/* Put the page list at the end of the bvec list storage.  bvec
    58		 * elements are larger than page pointers, so as long as we work
    59		 * 0->last, we should be fine.
    60		 */
    61		pg_size = array_size(max_pages, sizeof(*pages));
    62		pages = (void *)bv + bv_size - pg_size;
    63	
    64		while (count && npages < max_pages) {
  > 65			ret = iov_iter_extract_pages(orig, &pages, count,

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



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux